The unfortunate part of working on the railway is that sometimes you are required to enforce rules and regulations that some people present, whether customers or criminals who decide the law doesn't apply to them, do not like.
If someone is running for a moving HST pulling out of the platform and going to grab the door handle, I won't politely say 'please stand clear, sir'. I'll bellow at the top of my lungs to get back, and add a please if I have time to think about it. The result isn't intended to please the passenger, it's intended to shock them into an immediate response to remove them from an unsafe position. If they don't like it afterwards, then I generally explain myself, but won't apologise, as they're putting themselves in a position that is unsafe.
Equally, if someone is a fare evader, or committing a byelaw offence (refusing to stop smoking etc) or trying to breach the Vagrancy Act then it becomes more about enforcing the rules than advising and assisting them, up to and including having said individual dragged off the premises, which again, they don't tend to like.
However dealing with legitimate, annoyed passengers in the case of for example delays or poor service provision, should never be met with rudeness on the part of the employee - you can always walk away which may be seen as rudeness, but is in reality defusing the situation.