Sounds like you wired up a dead short through the switch.
That type of switch can ONLY SWITCH +12 power to have the light work right and not the ground side of the fan power.
You need to wire fans with relays and to a good power source such as the alternator stud, or battery, with a fusible link or hot wire 30-50A type fuseholder rated for the inrush current, powering one fan from the IGN slot is a bit close if not over the rating for it.
If you have a switch rated for the current one fan will draw and it is a lighted three terminal switch it must switch the +12 lead, fuse the wire to the switch right off the power source such as the alternator stud or battery and run the wire to the POS side of the switch, the ACC wire will go to the
+12 connection on the fan, and wire the fan ground wire to a good ground. The ground connection on the switch only carries enough current when the switch is thrown to power the lamp or probably an led inside it. And yes wiring it this way the fan can run any time the switch is thrown but it will be wired to a source that can handle the high current.
The Best way to wire it as previously mentioned, would be with IGN power to the switch POS, ACC to the 40A rated relay coil, the other relay coil wire to a good ground, and the fan connected to one switched relay terminal and the fused alternator stud wire to the other N/O switched relay terminal. Fan ground is grounded to the battery ground or engine/ frame ground directly.
The relay can only be triggered by the switch when IGN power is present.
Use the proper terminal to make sure the fan won't run when cranking the car could be both IGN 1 and 3 or just one of them I'm not sure. Cranking may remove IGN power always anyway I don't remember and my manual isn't available right now to check. Easy to check the IGN 1 and 3 slots with a meter or test light while cranking the car with the key.