It is a failure in security protocols and training. We had a similar event happen at a nice hotel a few months ago... they knocked and immediately started to walk in while we were taking a nap. I reported the incident to hotel management after we made it back home. My only motivation was to let them know about the issue and how they could make sure it doesn't happen in the future again. The front office manager scheduled a call to talk to me, mentioned they had already reviewed the incident and identified some changes they'd be making to their security protocols and training about them to make sure it doesn't happen again... and she said she had already authorized 15,000 points to be added to my account. At no point in my communication did I request or even indicate any sort of compensation and the gesture was completely unexpected. I think that gesture simply reflected how important the issue was to them...
Sure, we can always remember to quadruple our locks, but the reality is that we should have some degree of expectation that an employee of the hotel will knock on our door and wait for a response prior to even thinking about entering the room (unless there is a valid security concern, of course).