I am replacing an old (1980s?) ceiling fan with light. The light and fan were turned on with one wall switch and pull cables on the fan. I pulled out the fan fixture and found wiring in the box that I am trying to understand. My primary purpose is to leave the circuit wiring safe while I find a new fixture (and then ultimately to wire the new fan correctly).
In the ceiling box I found three cables, each with three wires (1 black, 1 white, and 1 copper). The 3 copper wires from these cables are all pig-tailed together, and so are the 3 white wires, the black wires were attached to the fan/light wires. I think what is going on is that one cable is the feed to the box and the other goes off to the rest of the circuit.
I pigtailed the 2 black wires from these cables together and everything in the rest of the circuit seems to work. I tested the wires and the white pig-tail is not hot and neither is the copper ground pig-tail. My black pig-tail is hot, but the final black wire for the third cable is not hot.
I think the final cable may be for the switch loop. However, based on everything I've read, it sounds like the white wire from the switch loop cable should be marked black because it would be switched hot and should not be pig-tailed to the other white wires (but it was and everything worked for many years?). What am I missing??