Why is the earth round? Why isn't it a cube or pyramid?
Gravity causes the earth to be round. Think of it this way. Suppose the earth were a cube. Then some points on its surface would be farther away from the center than others. The corners, for example, would be much farther out than the rest.
Since gravity works equally on everything, there would be a tendency to pull those uneven places down. The surface would even itself out. The only geometrical object in which every point on the surface is the same distance from the center is a sphere.
Asteroids aren't round because they aren't big enough for gravity to be a determining factor. If an asteroid were to suddenly become as big as a moon, it would indeed rearrange itself gradually into a sphere.