This is because the difference in electronegativity between copper and nitrogen is large enough to cause electron transfer, resulting in the formation of positive copper ions (Cu2+) and negative nitrite ions (NO2-). The electrostatic attraction between these ions holds the compound together.