The random sample has people of ages in it and in general people get taller and heavier as they age. Its almost the same thing with stars. We can't see the evolution of stars. It takes too long. Again the path a star's data point follows on the HR diagram is called its evolutionary track.
Stars are always at war with their own gravity.
While gravity pushes inward, pressure pushes outward. But the star shines - meaning energy is lost into space. Thus the opacity of a star at any time is one of the key properties which determines its structure. A star is in equilibrium when the pressure balances the gravity. In a steadily burning star on the main sequence, the outward pressure of hot gas balances the inward pull of gravity.