Some
marinas and a few other places (service centers, canals, locks, etc) will require you to have insurance that will cover damages to others caused by you or your
boat (liability coverage).
If you have a loan on your
boat, the finance company will require insurance that covers your boat.
Those are the only possible "mandatory" insurance requirements.
Your personal financial risk tolerance is a whole other question.
Would you be able to pay to fix your boat if it was dismasted?
If you ran into a
shipping container and put a big hole in the side, but were still able to bring the boat back to a port, could you afford the
repair bill, or would you have to give up and go back home?
If the worst happened and the boat sank and /or you had to abandon it at sea for some reason, what would you do then?
The right insurance could cover all that, and more - but you'll have to pay for it.
Is it worth the cost
to you to have that coverage?
A lot of people say yes, it's worth the cost, and buy insurance. A lot of people say no, it's not worth it, and don't.
It's really a very personal decision that only you can answer for you.