Why does my light switch have three wires and a ground wire?
Except for the change in light control, I would say this was a dimmer switch wiring or wiring for a ceiling fan for the main room, but it has to be that they were going to put a double switch there when they were wiring but changed their minds when they were installing the switch boxes. It could also be a remodeling issue if the closet was added later. You should try capping two of the non-ground wires together and wire the switch with the ground and the remaining wire. Number each wire with a masking tape tage before you start and rotate which wire is hooked up how – it could take three tries to get the right wires hooked up. If the extra wires were not connected to each other initially, you can try just capping each of them, but the ceiling light may not work then and the entire thing may not work then, depending on the circuit.