The point is pooling unpredictable risk. You don't know ahead of time if your house is going to flood. You do know ahead of time if your house is on a flood plane. Therefore, people with houses on a flood plane pay more for flood insurance.
The alternative is that low risk customers can't get insurance because they'd have to pay the same as high risk customers and that isn't worth it. Additionally, then people build tons of houses in extremely high risk areas because they can buy insurance for the same price as someone not doing something stupid, which is a moral hazard. Existing regulations have already caused this to happen in many cases.