Galaxies rotate because they, like everything in space, bend space and therefore are continuously falling into the warped space.