The explanation of lone pairs in water is summarized as follows:
The water molecule is so abundant and the shape of water is a bent molecule.
In order to complete it octet oxygen has valence electrons and requires additional electrons from hydrogen atoms. This also leaves two pairs of lone electrons which are not bound to any other atoms.
The above points is explained in detail Lewis structure below:
Therefore, the above points clearly explain the occurrence of lone pairs in water.