What causes water out of the exhaust pipe?

But a potato has water in it. Packing the exhaust pipe with uncooked rice is the way to go.

No, not true. Heating something up over ambient temperature will drive the moisture off. Cooling something down below ambient temperature will allow atmospheric moisture to condense on the cooler surface.

You are probably thinking of the amount of moisture air can hold, when it is warm, it can hold more water per unit volume then when it is cold.