Nearly every device that uses energy produces waste heat. In your house, most of this waste heat gets just ends up heating your rooms.
In warm climates where air conditioners are common, this is ridiculous. You're paying to pump the heat out of your refrigerator twice. First to pump the heat out of the fridge and into the kitchen, then to pump it out of your house and into the atmosphere.
Meanwhile, you're putting energy into another device to heat cold water.
So, why not combine the two systems? Why not use the waste heat from major household appliances to preheat the cold incoming city water before it gets to your water heater?
Between your refrigerator, air conditioner and clothes dryer there is a fair amount of waste heat just going, well, to waste.