Kinda weird to see Geico and Allstate commercials and ads everywhere, while simultaneously insurers are dropping customers aggressively and exiting entire regions.
Apparently some customers/areas are uninsurable, or not profitable to work with at any price. So the goal is to cycle out those customers and fight over the ones who never make claims. This violates some of our assumptions about markets - that someone will always come along and offer a product, perhaps at a high price, to even the least desirable customers.
Insurance could be different. When you're collecting premiums of 1-3% of a property's replacement value in exchange for a liability of 100% of the property's replacement value (a couple of years from now, with inflation), perhaps there comes a point where the premiums would have to rise so high as to not be affordable by the customers. People are struggling to come up with the now-common 6-7% down payments to buy houses - what happens when the insurance premium is 4-5% per year, every year? There's no profitable market is what happens.
It's like selling car insurance to a spiraling alcoholic with three DWIs in the past few months. Even if you quadruple the premium, you know they are heading for a crash within the next year. Even if they can afford a $10,000/year premium, you as the insurer will still lose money on the $50,000 claim you know is coming.
It's possible insurance doesn't operate under the laws of economics, but that would make it highly unusual. The power of the market is such a consistently observed phenomena. We really need to consider other, more likely, explanations first.
You may be seeing ads for insurance companies while they're pulling back from homeowners policies because the insurance industry is a lot larger and diverse. Things like auto, renters, umbrella, and so on. These other types of insurance may be very profitable while they're losing money on homeowners.
Then there are government polices that distort the market. In CA, which I'm quite familiar with, a state agency effectively caps prices thereby artificially limiting premiums to unprofitable levels based on forward looking risk modeling. There has been some reform to allow upward adjustments (hence the large premium increases in recent months), but in many cases the market is still below the clearing price. The hard reality in many parts of CA is insurance prices need to go quite a bit higher to accurately reflect the growing risk from climate change. This is understandably deeply unpopular so elected officials are trying to walk a tight rope of doing what's necessary while slowing it down and/or making it look like they're being helpful. In he meantime, competition is not going to rush in to fill the market need if they cannot do so at a profit.
Finally, there's the mess that is the FAIR plan further complicating the picture. FAIR is the insurer of last resort established by the state. It is privately owned, but backstopped by insurers operating in the state. If a fire wipes out FAIR's reserves then insurers like Allstate and Geico are on the hook to cover the excess claims in proportion to their market share. By holding all the highest risk properties in the state, FAIR is at very high risk of being wiped out, and no insurance company wants to be left holding the bag. So they're all in a race to reduce their overall market share in CA.