I realize that the only time the grounds and neutrals can be bonded is in a main panel, not a sub-panel. What I can't figure out is why could it be allowed in the first place? What were to happen if the neutral somehow were to get broken, wouldn't the current flow through the smaller ground into a grounding rod and burn it up? I also realize that the resistance of the earth is greater, but isn't that still dangerous? Thanks.
The reason they're allowed to be mixed in a main is a convoluted tale.
In principle they're supposed to be separated there too; however panels need a feature to keep 120/240V power from floating at some unnaturally high voltage to earth, e.g. 9600V from a transformer leak. That would cause problems for insulation in devices. So they take one of the active conductors, name it "neutral", and bond it to earth. The transformer then forces the other conductors to be the appropriate distance (120V) from earth. This bond is called the Neutral-Ground Equipotential Bond.
It would be perfectly OK if neutral and ground were merely close; so for instance a 1-volt transformer would be a fine N-G bond, giving neutral a 1-volt bias from ground and the other legs 121V and 119V biases. That is certainly better than the alternative, a 9600V, 9720V and 9840V bias from ground! However a piece of copper is the cheapest available bond.
At that point, manufacturers said "Wait, since they're all connected anyway, why not just let people use all the same bar?" There was no reason why not, so NFPA allowed it.
You're absolutely right; in a lost neutral situation, which happens a lot, current starts flowing across the N-G bond into the earth to the transformer's ground rod and back to the transformer. However the grounding electrode wires are plenty large enough that the limiting factor will be the conductivity of the earth.
The reason is to provide a path to trip a breaker when the first fault develops and to limit (control) voltage to ground. The secondary of a transformer is isolated from ground, if left in that state a single fault on a line conductor on a 120/240v service would make one leg measure 0v to ground, 120v to ground on the neutral, and 240v to ground on the other leg. One fault in one house would effect all houses being served by that transformer. No overcurrents would exist, so no fusing would trip. Somebody could be in contact with a metal frame of a faulted appliance and wouldn't know it. Then when a second fault occurred someone could get shocked, or at very least a breaker would trip and you could be looking for two faults hidden in four or more houses.
Trouble really starts to develop when you start dealing with multiple transformers like large multifamily or commercial building with multiple 277/480 3Ø, 120/208v 3Ø and 120/240v 1Ø transformers, all could have faults that could create multiple seemimgly random voltages to ground, and again it would take two faults before an overcurrent device would trip.