Making a nail electromagnet with bare copper wire?
Your bare copper wire probably has some tarnish (a.k.a some oxidation) and oil on it that may allow some of the coil turns to act like an inductor instead of being a total short. 

You are on the right track though of realizing that you would not normally make an electromagnet coil out of bare copper wire. Normally enamel coated wire is used for coils because it insulates the turns but is still thin. The thin coating allows the wire turns to be packed more tightly on the coil resulting in more total turns in a given space. If you even tried to make a coil with wire insulated with thick plastic, PVC or Teflon insulation you would note the difference in the performance of the electromagnet right away.