Can you even get insurance on an illegal activity. It seems clear that many people on Airbnb are either illegally subletting their rental apartment or in places like NY where Airbnb is violating laws meant to stop illegal and unlicensed hotels.
Sub-letting is more often perfectly legal, but yes, I'd imagine if you are in contradiction of either your rental agreement and/or local laws you would also be voiding your insurance contract.