Ground state elevation for phase transition
In order to make the phase transition, you need to supply your sample molecules with an additional amount of kinetic energy (i.e., the heat of fusion or vaporization) to overcome their intermolecular bonding. This however means that after the transition, your system contains more internal energy than before. That additional energy is encoded in the vertical offset on the energy scale.

Note that if you look at each phase on its own, you could set the their ground states as the zero point on your energy scale. However, if you want to compare the system among different phases, then you need to take that offset into account. Otherwise you'd assume that your system can change from solid to liquid to gas without any effort.