Failure of the free market
Difficulty in provision. There is little, if any, incentive for a firm to provide flood defences through charging local residents. There is a big free rider problem. People on flood plains may have a vested interest in better flood defences, but there is temptation to avoid paying and hoping someone else will pay.