1. Shower faucets were left on and the shower was shut off at the shower head. Hot water crossed over to the cold pipe that way.
1a. A similar defect exists in your washing machine water inlet mechanism. (OT: The wall faucets to the washing machine should be shut off between washes which will also cure the topic of this thread. A leading reason for flood insurance claims is broken or burst washing machine hoses.)
2. Your water heater does not have an expansion tank and as the next tankful was heated, it expanded pushing back through the cold water lines.
3. The cold water line runs very close to the hot water line over some distance or runs through a radiant heated concrete floor slab.
Forget super sized fries. The Washington Redskins could promote healthy eating with First Lady Obama by choosing a (red skinned) turnip for a mascot.