See my previous question for more detail on my household's bizarre wiring. Three of my bedrooms have dimmer switches connected to outlets and ceiling fans, which is electrically unsafe and just horrible practice, so I have been replacing the switches with toggle switches. The first bedroom only had two wires and a ground coming into the switch box, so it was an easy change. In the second bedroom, things are a bit more complicated, as you can see here.
This is probably hard to see, so let me describe it. There are two cables coming into the box, one from above and one from below. Both cables have white, red, and black wires, and a bare ground. The two grounds are wired together, as are the two white wires. Not pictured out of frame is the dimmer switch, which is connected across the black and red wires.
This is what is confusing to me. The black wires and the red wires from both cables are connected together as well, and the switch is connected across the black and red wires from both cables. I would imagine the wiring like this is set up so maybe the overhead lights and the fan can be controlled separately, which would definitely be nice to be able to do, but I can't figure out how that would work.
Let me state that again, all of the wires from the two cables are connected directly together. The switch connects two wires in the same cable. Can someone give me a sense of what might be going on here?
Edit: Doing some testing with my ohmmeter, the black wires are connected to the always on outlets, and the red wires are connected to the switched outlets and the lights in the ceiling fan. I separated out the red wire bundles, and the same wire (from the lower cable) connects to both the switched outlets and the lights in the ceiling fan. So I'm not even sure what the upper cable is for.