Because when the moon rises the sun goes down to tell us its night.. and the time to rest. And when the sun rises and the moon sets it tells us its time to wake up and start the day for work and play.
God made it like this so we can sleep and get energy for the next day.
Hope this helps!
Brainliest would be appreciated!