Pure luck
Fun fact, if you go back in time or forward in time say a Billion years, the moon wouldn’t be the same apparent size as the sun, as it is drifting away. So in the past, the moon was bigger than the sun, in the future it’ll look smaller
This is because the moon tugs on the earth unevenly, because it’s orbit is slower than the earths rotation, it steals energy from the earths rotation, causing the day to lengthen and the moons orbit to rise.
Latest Answers