The cooling effect comes from the smoke or vapor having more surface contact with the water. Percolation is what really helps this and the smaller the bubbles the more surface area there is. The more air bubbles the cooler and more filtered the smoke or vapor will be.