Because it takes energy to make the phase transition from solid to liquid. Where else would it come from rather than heat energy?
There are, after all, two different energy transfer processes in thermodynamic systems: heat and work. Work, by the first law, is always reducible to raising and lowering of weights -- which obviously does not change the phase of the substance. So heat it must be.
Heat does NOT always raise the temperature of the substance. That is so only for substances with a definite heat capacity -- as is normal for substances when well away from the temperatures/pressures at which phase changes take place.
Why does it take energy to make the phase transition? Because to overcome the attraction between water molecules that would make them solid, you need to give them the kinetic energy to keep them moving away.
LIVE ONLINE CLASSES
Prepraring for the competition made easy just by live online class.