Water itself doesn't actually hurt electronics. What hurts them is shorts caused by the electricity jumping circuits and ending up in places it shouldn't be.
So while that certainly can happen, it's also possible that the phone got the "uh oh, something's wrong" message quickly and shut itself off before harm was done. If that happens it doesn't matter how long the phone is under water. Nothing's going to happen.
No doubt about it, you got lucky. But it's not impossible for a phone to survive submersion.
What you have to worry about now is if the water left impurities on the circuit board. It's possible that something in the water that conducts electricity was left behind when the water dried. This is why Apple won't cover such phones under warranty. Even though it's fine now it could still break next week because of what happened.
But if works ok I'd say your chances are good that you'll be fine.