I've done a lot of electrical work in old houses, but only in big cities where a failing inspection is just not tolerated. I've seen old country homes where regulation is ... less strict. This might not be an urban/rural divide, but that's my experience having lived in both.
I'm amazed that you were able to buy or sell a house that did not pass inspection. If the buyer was financing, the mortgage would require insurance, which would require inspection. In a cash sale, the buyer should be sophisticated enough to take responsibility for the repairs.
I think (in my high-regulation states) it's actually not legal to sell a house that does not pass a safety inspection. At least not without surrendering the certificate of occupancy until repairs are completed and inspected.
But re: tripping the main -- this is likely a fault in the breaker itself. It's not likely that a faulty line breaker allowed enough current to trip the mains breaker (though it does happen, but see below). Of course several overloaded lines can trip the mains, but this is exceedingly rare. A fault in the mains breaker is a serious problem for sure. However, unless you inspected the wiring yourself, I'd hesitate to assume that it was miswired as you describe.
In standard US residential service, you get two 120V lines ("legs"). If the mains breaker failed, it's possible to lose one of those legs to the buss that supplies the line breakers (and the house fixtures), while the other leg stays up and powering the "other half" of the house. In this case, 240V appliances will appear to be "out" because they are only getting partial power (240V is really just two 120V services, 180degrees out of phase).
So I'd guess the cause was a failed/fatigued mains breaker. That's a job for an electrician, regardless, who would surely notice miswiring if present, and the other code violations that you definitely had.