Non-metals usually need more than two electrons to attain the octet structure, its not chemically economical to lose three or more electrons and it is difficult to get metals that will donate three or more electrons, so non-metals share electrons in order to attain octet structure.