Here's why:
* Nuclear Fusion: The core is where nuclear fusion occurs, the process that powers the Sun. This fusion process releases immense amounts of energy, causing the core to reach incredibly high temperatures.
* Pressure and Density: The core is incredibly dense and under immense pressure from the weight of the surrounding layers. This pressure helps to confine the hydrogen atoms and allows them to overcome their electrical repulsion, fusing into helium.
While the Sun's photosphere (the visible surface) has a temperature of around 5,500°C, the core is much hotter due to the intense nuclear reactions happening within it.