If the main is tripping, you don't have an overload condition, but a short circuit condition. The circuit breakers are not operating in their thermal range, but in their instantaneous magnetic trip range. It is just a matter of which breaker has the faster electromechanical reaction time. Even though this could vary by just a few milliseconds, once the faster device trips, the condition for the trip is removed, so the second device does not trip. Because the main breaker is seeing additional loads, its trip mechanism will be pre-loaded, so to speak, so it may have a shorter reflex time than it would if both breakers were going from zero load to full trip.