Just finished watching the production team commentary for FotR, and they explain this scene!
Frodo and Sam (after Sam did NOT almost drowned) were going to be paddling off to Mordor, and an Uruk comes out of the water and grabs Frodo. In the struggle, the Ring slips away from Frodo and the Uruk goes after it, actually drowning himself. Then Sam would then save Frodo (who magically gets the Ring back?) and they'd go off to Mordor alone together.
They said that New Line was thinking that it's a bit anti-climatic (I can't remember the precise word) for the end there with Frodo and Sam for them to just leave, add some excitement: add an Uruk. It was supposed to get you thinking that "the enemy is gone, but no wait, it really isn't."
Then New Line saw what they were doing with the scene, and were like, "Well, maybe it'd be better to put the focus more on Frodo and Sam, have Frodo almost loose Sam..." The folks making the movie happily agreed, and so now we have Sam almost drowning (that was in the book in the first place, I might add

).