If you have a mortgage on the condo then yes condo insurance is mandatory.
The bank that holds the mortgage for the condo will require you to have condo insurance to protect the condo you're buying.
However if you have the condo paid for and have no mortgage on the condo or you pay for the condo in full without the bank then you are not required to have condo insurance.
The condo fees that you pay cover the actual building and property as well as hallways etc that the condo is built into.
But the condo insurance you have pays for damages to your personal condo or any damage from water etc that damages your condo.
Having condo insurance is highly recommended though to protect your investment into the condo should something happen.