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.
Do you get coverage you can count on? From the bag of fertilizer? From your lawn sprinklers?