I'm almost sure your answer is going to be "Because the sun's mass creates a gravitational force that pulls earth towards it."
correct me if I am wrong.