Why did my main circuit breaker trip before the branch circuit breaker?
"Circuit breaker coordination" is the term used when setting up multiple breakers / fuses. The trip curves overlap and in many cases a small breaker can take longer to trip than a large breaker. 

One example I can provide is this: the plant I work in was not built with the same brand breakers. In one area an 800 amp main will trip out prior to the 400 amp mcc feeder or the 100 amp breaker on the motor overload bucket. The cost to coordinate these breakers to the correct ones would be several thousand dollars and it happens so infrequently that the owner is OK with the occasional down time. By comparing the curves of the different types of breakers you can see that fuses and small inverse time breakers will hold at 4-6 times their rated value for a short time. 

So depending on the loading of the circuit and type of breakers used, if not well coordinated, the main will open before a much smaller breaker protecting the wiring but dropping power to everything. A well coordinated system takes planning and the correct breakers and fuses to prevent this from happening.