Clearly, they are legal...but they are irritating. Many properties will take them off your bill if you mention that you did not make use of the "resort" services.
Certain properties explain the charge upon arrival which makes it impossible to dispute it upon departure.
This is another thing which sways me to book properties which do NOT have such a fee. It should be built into the room rate.
One exception--Westin La Paloma. After some years as a repeat guest, I am nearly always prebooked into a suite, and I am willing to pay the nominal resort fee to enjoy this benefit.