I know that we're supposed to bond neutral and ground in the main panel but can't quite understand what the actual danger/problem with this situation is. I also understand why we don't bond neutral and ground in a subpanel but don't understand the problem for keeping them separate in the main panel.
Maybe if you owned the transformer
Imagine you had total control of the transformer. (which you probably don't). You would be able to assure that the neutral-ground bond did not exist anywhere. If you accomplished this, and didn't have any defects in your wiring, then you would have an isolated system which I discuss here.
There are advantages and disadvantages. As I discuss, the first ground-fault isn't dangerous. It merely biases the system (like a ground strap would do); just at an unexpected and unplanned voltage. A hot-ground fault pegs that hot as 0V from ground; neutral is 120V and the other hot is 240V. On the other hand, a supply transformer primary-secondary fault pegs your wires at 2400V from ground. Is your toaster insulated for 2400V? I'm guessing not.
Another disadvantage I didn't discuss is that -- remember that power wants to return to source, not ground. Except lightning does want to get to ground. So does ESD. If your toaster isn't insulated for 2400V, it's probably not ready for a 50kA lightning hit. Shuffle your feet across the carpet and zap the toaster chassis with static electricity, where does it go? Can't go to ground, the toaster has a 2-prong cord. Without a neutral-ground bond, it will be efficiently carried to every device, even the ones that are "turned off" - neutral isn't switched.
Remember, hot and neutral are not isolated -- they are bonded, with a bias. A 120V bias assuming the transformer is turned on. A transformer winding has very low resistance.
... Hazardous if you don't own the transformer
Most likely, the transformer is owned by the power company, and they have a neutral-ground bond at the transformer. And several other houses are served by the same transformer, and each has a neutral-ground bond.
So what happens if you have a bolted (zero ohm) hot-ground fault?
It's flowing into your grounding system, as intended. It wants to get back to source (neutral). It will follow all available paths in inverse proportion of their resistance. Where does it go? Not directly to neutral, because you didn't bond it. So where?
"Okay, it'll go through my healthy grounding system, to Earth, across Earth to a neighbor or the transformer. Because Earth is magic." Nope -- earth is dirt. Dirt is a lousy conductor.
Not enough current will flow to pull your grounding system back to 0V where it belongs. So it will raise the voltage of your grounding system to near 120.
Now every grounded surface that was meant to be safe - the cover plate screws on light switches, your PC, your refrigerator, your dishwasher - is now energized near 120V. Via the grounding rod, it also raises the voltage of the earth around your house to 120V, causing all kinds of weirdness.
What's more, because it won't flow enough current (20A) to trip a breaker, it won't trip a breaker. So this fault will continue indefinitely. How would you even know it was there? You'd live normally until something extreme brought it to your notice. What would that even be?
I've heard of a situation where a landline phone wouldn't ring. The repairman, calling to confirm a repair date, asked how the customer knew to pick up the phone. "My dog yelps", they said.
Uncontained electricity is crazy stuff.
It boils down to a very basic notion of less resistance. Less resistance means the fault current travels less and less means quicker response to open the over current protection device (breaker).
The Grounding System should normally never have current on it.
When the neutral is carrying imbalanced current you don't want to willy nilly put that on the grounding system because....yep resistance is increased when there is power on the conductor.
After thinking about it and commenting on Harper - Reinstate Monica's answer I realize it is a trade off. Utilities may not be required to ground the secondaries on their transformers in all areas, or that ground could be faulty. They might be relying on many buildings providing a grounded neutral to blow their high Voltage fuses and keep the secondary Voltage minimal in the event that a transformer high Voltage side comes in contact with the 120V side. So that could influence what the code requires.
If the neutral is bounded to ground which should also be connected to a suitable grounding rod or water pipe, then it helps in several situations. If the service neutral opens up, the ground can partially take over and prevent Voltage doubling from 120V to 240V on the split phase system. This can prevent damaged appliances and fires. If there is a lightening strike or a fault that connects the primary and secondary of the utility transformer together, the ground can significantly reduce the amount of Voltage between earth ground and the 120V circuits. Double insulated devices like hair dryers and toasters wouldn't become energized to the full utility transformer primary Voltage, which could be 7.2kV! Edit: I neglected to mention the most important reason for bonding the ground to neutral. That is as situation where a hot to ground short occurs, which is a very common fault. If the ground is not bonded to neutral, then the entire ground circuit in the building becomes close to hot until the circuit breaker trips. Ground rods can have several ohms of resistance to ground, which is far too high to keep the ground to safe Voltage in such a situation.
The advantage of having the ground separate from the neutral is that it is safer for grounded appliances in situations where a neutral fault occurs on the utility side. When the ground is bonded to neutral, and one of the three situations mentioned in the previous paragraph occur, the ground rod is likely not able to keep the Voltage in the ground circuit at a safe Voltage relative to the real earth ground. If an open neutral situation occurs, the chassis on a washing machine or pool pump could rise significantly if the ground rod has a poor connection. Even 50 Volts between a chassis and earth ground can be dangerous in a wet environment. If high Voltage comes in by the other two situations, someone who is touching a grounded appliance could be killed. If 7.2kV came in to the building wiring it might arc over to ground anyway and you wouldn't be much better off, but your chances are better.
So it's probably better to bind ground to neutral just for the lightening strike and double insulated device situation in most cases, but if you have grounded pool pump or similar device you might want to consider doing something else, if a very good earth ground connection is available.
I think the best way is to have two grounds that are somewhat far apart from each other, if the risk of a neutral fault on the utility side is high. One for neutral, and one for ground. This gives you the advantages of a bonded ground and a separate ground at the same time. A very good earth ground is needed for the ground circuit due to the hot to ground short condition in an appliance.
I wonder how well my idea of binging the ground to neutral with a fast acting fuse would work. If the ground rod had 2 ohms resistance, then an 80 Amp fuse would keep the ground under 40 Volts if an open neutral fault occurred. A lightning strike should exceed the interrupting rating of the fuse making it behave somewhat as a bonded ground in that case. If the utility transformer shorted high side to low side, results would vary depending on the Voltage and interrupting current of the fuse.
That site seems to be fairly responsible about maintaining working links, but here is the title of the article just in case: "Danger of Open Service Neutral" - mikeholt.com