Why are there three cables coming into my ceiling fan box?
(A partial answer)

Why are there 3 cables in the box?

One cable brings power from &quot;upstream&quot;, either directly from the circuit breaker to the fan, or from the breaker via another fixture.
One cable leads from the fan to the switch. This should be the cable that you connected to the fan. This is what enables the switch on the wall to operate the fan.
The last cable takes hot power from the box to another fixture somewhere. Turn on all the lights in the house, then turn off the breaker that controls the fan. See what else turns off - that's where this other cable leads. (Once you've figured that out, you may want to be sure the label for the breaker accurately describes what it powers so you don't have to figure it out again in the future.)