When a metal bonds with a nonmetal, electrons are transferred from the metal to
the nonmetal because metals have very low electronegativities and nonmetals
have high electronegativities. Because nonmetals tend to have similarly high
electronegativities, neither atom can take electrons from the other, forcing them
to share electrons.