Oxygen and hydrogen don't have the same eletronegativity. Oxygen is greater so it hogs the the electrons when a covalent bond occurs. After the sharing of elections, the compound is neutrals. Oxygen became slightly negative and hydrogen became slight positive.