The
electrons which are shared are no always near oxygen. Oxygen keeps six
electrons to itself. And the four shared electrons travel between oxygen and
other atoms and contributing four half-charges to oxygen. This
provides oxygen about eight units of negative charge and this causes balance
the number of protons in the atom. So this is the reason that by making two covalent bonds, an o atom
(with 8 protons) fills its valence shell and atom's charge stay close to zero.