Why is the atmosphere of the sun hotter than the surface?
The reason for this is not exactly known today, but the clues scientists have point to the chaotic magnetic field of the sun additionally heating the atmosphere. There are two models so far, that compete in explaining the extra heating, but the available measurements are not good enough yet to tell which one is right. One model is based on electromagnetic wave heating, pretty much like a huge microwave oven, the other is based on reconnection events in the suns magnetic field, when multiple smaller magnetic fields connect to become one. The first model means non-uniform heating, the other uniform heating.