Water cooled exhaust goes way back to the days of no thermostats and cooling water being pulled directly from under the boat, sent through the engine (in lieu of coolant) and out through the exhaust manifold. Having the water pass through the exhaust manifold has several purposes.
First of all, cooling the exhaust manifold! This design goes all the way back to the earliest internal combustion engines used on boats. If the exhaust is not cooled, it can easily reach temperatures exceeding 900 degrees. Those temps do not bode very well on a wooden boat. (Think turning the wood into charcoal.) This still applies today even with modern diesels and fiberglass boats.
Secondly, the hot water (nearly steam) has to exit the engine. Sending it down the exhaust is the most logical way to get rid of it. Also, sending down the exhaust pipe also calms the exhaust and acts like a muffler. Many boat mufflers are nothing more than a loop of pipe in a barrel that makes a trap. The exhaust detonations are caught in the water and muffled before exiting the system. This is done by a "rise" in the exhaust pipe.
On older engines and boats like mine, the rise may actually be below the engine as shown in this video (Watch towards the middle to see the whole exhaust pipe). This is the same KL engine I have in my boat. (This is Snake Mountain Boatworks and these guys do fantastic work!) Notice the exhaust is slightly muffled.
https://www.youtube.com/watch?v=KqcQtqWcGWI
Compare that to this video of a K engine (not long stroke and only 95 hp). This owner has the exhaust exiting straight out the pipe. Look at the difference in how the water is splattering versus the previous video where the water exits in gulps. Plus this engine appears to have a deeper, throatier sound. Same exhaust from the engine, just different rise (or lack there of) in this engine.
https://www.youtube.com/watch?v=KnFqQWJ8-EU