The reason this happens is simple: other people's money is subsidizing the losses.
First, Florida is extremely fiscally conservative. Taxes for anything are a hard sell. Without additional taxes, our infrastructure will continue to lag, causing far more damage than would've been had we ponied up the taxes in the first place. Also, infrastructure is not prioritized over glitzy marketing. St Petersburg is in dire need of a waste water treatment plant upgrade, but it's mayor is going to spend the money on a development project instead ("The Pier").
Second, insurance: the state has a high risk pool that you can join as an insurer of last resort, and they'll insure you across multiple losses. As long as we continue to issue insurance (taxpayer sponsored!) for properties that are subject to repeated losses or sea level rise, we'll continue to throw good money after bad.