Why would a short cause the main breaker to trip instead of the branch circuit breaker?
I don't think this indicates a problem.

Circuit breakers have at least 2 different triggers for cutting the power:


Thermal mechanism for small over-current protection, e.g. trying to draw 20 amps from a 15 amp circuit. This may take several seconds or even more than a minute, depending on how much over the rated capacity you are.
Magnetic mechanism for short-circuit protection, which should kick in around 20x the rated ampacity. This should trip the breaker virtually instantly.


You can look up the time-current curve for your breakers if you're curious how long it takes them to trip under different conditions.

(There may be additional features that cause the breaker to trip, such as arcing or ground fault detection.)

If your circuit had tripped because of a slight over current, such as too many appliances running at the same time, only the breaker for that individual circuit should have tripped.

However, for a short-circuit condition (which I assume you had with your dimmer), either one could go. It's a little surprising that both tripped, but there is a  slight delay in response time so it's not inconceivable.

(Actually, you could have had 3 different breakers trip: the breaker for the circuit, the breaker for the sub panel feed, and the main breaker).