In times past, even when Saul was king, it was you who led out and brought in Israel: and Yahweh your God said to you, You shall be shepherd of my people Israel, and you shall be prince over my people Israel.
And so he poured the water out on the ground because he just felt unworthy to drink that water. He felt that those guys that were willing to hazard their lives for a thing like that better that they give it to the Lord. So he poured it out to the Lord, verse eighteen.