After having to spend $80 (or $60, I don't remember) a person for the TA back in October 2021, $40 seems like a bargain to me!
I see it as Bermuda trying to recoup some of their lost tourism income during Covid. It's their country and they can do what they wish. If we want to cruise or travel to Bermuda then we have to pay the fee.
I believe that even Bermuda residents traveling home need to pay the fee.