Condensate pump wiring
I can't speak to code directly, but generally things like pumps are placed on non-switched circuits to prevent someone from accidentally turning off the pump and then flooding the house.

Imagine a scenario where someone is trying to figure out what the switch does because they can't/won't follow the cable. They flip the switch a few times and nothing happens. There's now a good chance that the switch is in the off position because a) if they're too lazy to follow the cable then it's a safe bet that they are too lazy to remember or care about which position is on, and b) there is no external indication that the switch is off because the pump only runs when it's full of water.