So why are you allowed to enter the hotel with luggage?
Most big hotels provide a vault or will hold luggage locked in a secure area as well. They won't open it for insurance/liability purposes and do not require access to the contents. A person could trivially store contraband in the hotel's direct custody and not throw a red flag by keeping the cleaning lady out.
This is just security bozos throwing their weight around.