Why don't electrons take the shorter path in coils?
This type of wire, used for making coils, is commonly called "magnet wire". https://en.wikipedia.org/wiki/Magnet_wire

It looks like it's bare copper, but it's actually coated with a very thin layer of transparent insulation. Otherwise, you're absolutely right -- if the wire were really bare, the coil wouldn't work because the current could cut straight across from one lead to the other.