I pulled out a one-way dimmer light switch in a bedroom in order to replace with another dimmer switch. Within the switch box, there were two black wires connected together, with another single black wire exiting out of the connector (see the red connector and the yellow arrow). The single black wire exiting the connector was then connected to the switch. Can someone explain why these two wires were connected within the box? Was it to convert a three-pole into a single-pole switch, or for some other reason? Is this something I should be worried about?
That thing there is called a pigtail
You probably know that your house has many more “points of use” (places electricity is used) than it has circuit breakers. How does this work? Power (in a cable containing hot and neutral) are brought to a point-of-use (technically that’s called an “outlet” even if it’s a light/switch)... then hot+neutral are continued onward to another point-of-use. In effect, the outlets are “daisy chained”.
You see this all the time in receptacles. They have extra screws just for the purpose of making that “onward cable” easier to hook up. (Tell you a secret: I don’t use them, I pigtail everything. Getting stranded wire onto receptacle screws is fidgety work, and it’s easier to do at a comfy workbench. Climb the ladder, flick 3 wire nuts and I’m done. Not recommending that, just making the point that the dual recep screws, and pigtails, are basically doing the same thing.)
Switches and lamps don’t have dual screws, so you see a lot of use of pigtails to achieve the same effect.
Moreso, you have a double pigtail, where the multiple wires join to a short branch wire, then that short wire joins to another short wire. That’s somewhat redundant, but very harmless (assuming the wire nuts are done competently).
So I would leave it just that way, don’t disturb the 3-wire splice, and break the 2-wire splice. That way you are joining 1 wire to 1 wire, and there’s no confusion which is supply and which is lamp. If you broke it up and suddenly have 3 black wires, that turns into a real headache.
Competent wire nuts = survives a pull-test without tape. Tape is very bad! A wire that pulls out will also have arcing problems and start a fire. When people tape wirenuts to keep wires from falling out, they do it to conceal the pull-out problem, which also conceals the arcing problem!
The additional black wire is probably continuing the hot to another outlet or light switch. If you were to disconnect the black wires that are connected together from the wall, you'd find that only one has power. If you were to leave the other wire disconnected, you'd find that other outlets and/or switches would stop working.
Just go ahead and connect the new dimmer the same way.
This is the typical way to connect a switch. The 2 blacks connected are "power in, power out" to the next switch in the circuit. The pig-tail to the dimmer connected to the two blacks is also typical. Most inspectors (and I believe the code as well) require rough in to be completed to the extent that the box is "ready to receive the device". Which often means using pigtails. What you have is very typical and up to code.