Because earth has its gravitational force. and it doesn't need any medium to apply this force. everything that exist in this universe has mass. the thing having mass have its gravitational pull. so earth attract everything having mass. that's why asteroids are attracted by earth. and also we humans have mass. so it also attracts us.