Asteroids start as clumps of dust, that gravity pulls together. But gravity is not strong enough to hold it together, you need something to cause tiny particles to stick together. Particles in space stick together because of static electricity, causing clumps that now look like dusty bunnies. Very very light, but firmly stuck together. Now what happens if you throw a dust bunny at another dust bunny? They might stick or bounce off, but both will end up at a slightly higher density than they were before. The energy of the collision cause the clump to rearrange, getting more and more dense. There is also a lot of metal is asteroids, metal has some strange properties that you don't notice here on earth. If you take a piece of iron and touch it to another piece of iron on Earth nothing happens, that's because there is a thin layer of rust covering both objects, in a vacuum though iron will instantly fuse to iron.