I'm guessing it's because the shell is porous and there's a thin layer of water underneath the shell when it's freshly boiled which makes the shell slip off easier. When the egg is cold that water has evaporated and the shell sticks to the inside.