Deep water is not necessarily hot. Water on the bottom of deep ocean depths is quite cold due to the lack of sunlight. I think what you mean is why does deep water stay hotter longer than shallow water. Water has a surprisingly high boiling point for such a small molecule. This is due to an elaborate network of hydrogen bonding that water is able to undergo with itself. As a result, water has a very high retention of heat. A large mass of water is able to retain its heat for a long period of time compared to other common liquids. Deep water has less surface area interacting with the air and consequently retains its heat longer without letting it radiate into the atmosphere. Shallow water has more relative surface area and radiates its heat to the atmosphere more quickly.