The atmosphere is densest at the surface. At sunrise and sunset, the sun's light is passing through that denser air and is refracted upwards, just as we saw in my Mirage video. The lower part of the sun is going through the densest part of the atmosphere, so it is lifted more, giving the sun a flattened appearance.
The refraction lifts the entire image of the sun, making it appear higher in the sky than it actually is. When we see the sun sitting on the horizon, as in this photo, the sun has actually already dropped below the horizon. It is only the refraction of the air that lets us see it.