One of the strongest psychological biases that influences us is the bias of reciprocation.
We react the same way we are treated.
If someone is nice to you then you are nice to them. If someone is bad to you, you become bad towards them. What adds to this bias is ego. Everyone has one! This intangible feeling makes us do irrational things. If your ego is challenged you might go out of your way to exasperate a situation even if its against your best interest. Most people want to defend their ego because it effects their self esteem. The best way to not stir someone the wrong way is to speak with them nicely to come to a consensus. You will be surprised how often a solution is found that accommodates both parties. But if your default is to threaten the person in front then you will bring out the lion in them.
In the scenario where you are at the receiving end of immature behavior, be wise. Ask yourself “is this really worth my time and attention?” “Am I really so weak that any random person can destabilize my sense of balance?”
If you are wise enough to avoid conflict then you are the bigger person not the weaker person.