When you mix water, you don't get foam. This is easy to understand. The difficult part is WHY?
There are many levels to explaining this commonly seen phenomenon.
First is the interfacial energy approach. It is well known that generating an interface costs energy. Thus, liquids for example try to minimize water-air interface by clumping together. When you foam liquids, you are increasing the total contact surface. If this isn't obvious to you, think about it like this: suppose you had 1ml of water as a sphere. What is the surface area here 4/3(pi)(r^2) = 4.835? What if you had lots of "1ml" sized spheres but only 0.02cm thick? the radius of the 1ml bubble is 0.62035 cm. Each of the 0.02cm thick bubbles would have a volume of 1 ml - 0.906363 ml = 0.093637 ml and the surface area would be 4.836 cm2 (outside) + 4.529 cm2 (inside) = 9.365 cm2. There are around 10 of these to make 1ml so the total interface is 93.65 cm2. That's around 20x more. So that's 20x more interfacial energy required. I believe I explained in a previous post how at equilibrium, things tend towards minimum energy state.
But water isn't perfectly circular on the floor. Right. But there's other energy things like gravity and the interfacial tension between the floor and water is not the same as water and air. By adopting a more flat shape, it can be in contact with more floor with possibly smaller interfacial energy per unit area. At the end, everything must be considered.
This brings me to the next point which is about how soap works. So soap works by decreasing interfacial energy per unit area. Soap molecules such as sodium dodecyl sulfate (part of dishsoap for example) have a hydrophilic (the water loving) part and a hydrophobic (the water hating) part as mentioned in the soap post. These two partition to the interface. Ultimately, the interface doesn't cost as much so it's easier to make it.
To me, the interface costing energy is very observational and doesn't provide much insight into WHY. Another way to rationalize this is by thinking about entropic energy costs. When there is a separation between things, you are organizing things into parts. This costs energy. When surfactant is added, it can lower the overall interfacial energy since there are huge enthalpic gains from the interaction of the two ends of the surfactant molecule. This also doesn't provide a lot of insight into why, but for now, I'm happy with this. A better understanding perhaps can come from statistical mechanics type approaches