Gonzalez.vera nailed it with the science behind it. This kind of thing happens in a lot of places, like washing your car with warm water to clean it better versus cold water to keep it from spotting. Cold water seals everything up tight, just like with your hair color. Weird how little tricks like that actually follow the same rules across different stuff.
Wait, you mean it actually works? My cousin swears by cold water for her bright red dye, says it keeps it from fading so fast. I always thought she was just being extra.