. I suppose the real question is why do comets and other icy bodies not undergo sublimation?They do, but it's slow.
In order to pull water molecules away from the ice you have to supply energy (the latent heat of sublimation).
In deep space there's practically no energy supply so evaporative cooling will chill the comet down to a point where it only evaporates very slowly.
When the orbit takes it near the sun, it starts to evaporate because it warms up.
The vapour is seen as a tail