Because you're getting closer to other planets?
Just as during formation, when the material contracts, the temperature and pressure increase. This newly generated heat temporarily counteracts the force of gravity, and the outer layers of the star are now pushed outward ( in not sure tho ) I hope this helps
It would be c repeated processes-that are used in a variety of ways