Not following electrical codes can be very dangerous. It can lead to fines, legal problems, and trouble getting permits. It might even make insurance claims invalid.