Same thing that creates mirages, the atmosphere bends the light and you can see object that are beyond your horizon. The air is not uniform, there is a big change in temperature and density with altitude, also local atmospheric conditions will have an effect. The result is that the air acts as a giant lens. Also related to the reason why sky is blue and sun is red when it's low.