Two black wires connected into a single black wire in light switch box
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.