It's mandatory if you finance the car. And car loan rates are pretty low, so it often makes sense to take one (including the insurance) even if you could buy in cash.
Though if you have any financial assets to use as collateral, you can get cheaper leverage elsewhere. Then you don't need to buy an insurance contract with negative expected value, for a capped risk that you can tolerate out of pocket.
I borrowed for 6 years at 0.0% on my last car purchase. Even taking into account the portion of insurance that was surplus to the expected value of the insurance, that was about the cheapest money I could find.