Well for one the correct way to ask this is, "Why is the sun hot?".
Now for the answer.
The sun is not fully a solid, the outer and mantle part of the sun is a liquid and the core and other solid parts are so incredibly dense it cannot break. Also, in retrospect the breaking of the sun, which is actually a star is kind of far fetched.
This is because the sun gets its heat from burning gases, this heat is projected out word. The core of the sun is very hot as well so the heat from their is pushing out.
If you are saying most things we heat here on earth "break" that is not always true. Most things such as metals, glass, plastic, etc, just melt and change from a solid to a liquid. So they do not break they just have a change of state.