Perhaps the balcony over your front door is not properly constructed and is not properly shedding rain, so one day during a torrential thunderstorm you suddenly have a flood coming in OVER your front door.
Perhaps your water heater pan is not draining correctly, and one day you have a catastrophic containment failure in your water heater, causing an interior flood.
Perhaps you change the toilet in an upstairs bathroom, and the new modern toilet is not providing enough water per flush to make the long run of the upstairs plumbing. So, it clogs up over time, then one day it backs up while you’re taking a shower, and you’re standing in multiple inches of grey water. Then the water does slowly drain, but you don’t notice that the pipe has cracked above the clog and it’s actually flooding into the room below, through the light fixture.
Perhaps the main schedule 40 PVC pipe from the water main at the street slowly develops a crack, due to the roots of a tree nearby, and one day you discover that the water pressure in your house is really low and that you have flooded the whole street.
Guess which of these have happened to us?
Building codes exist for reasons. Sometimes they seem frivolous, but often they're there for a damn good reason.
It's particularly demoralizing to see the scope of the problem when it's all that water flooding your property and know there's nothing you can do in the short term, and even the long term is just trying different things and hoping they work, knowing that it will probably take a few tries.