Sometimes we tend to get lost in our own egos, we get stuck in the me, myself and I mentality. We forget that everyone else has thoughts, feelings, ideas and their own take on life. We quickly judge the behavior of others without any consideration to their human conditions, such as problems in home life and work related problems along with the stress of just trying to survive in this world. One should always try to empathize and acknowledge that the other person is facing similar if not worse situations within their life. In a nut shell , if you have problems or just are having a bad day, so can the other person you are talking to or having issues with. We all have issues to deal with, we all have bad days and good. Sometimes we are just in a bad mood because we are. Remember other too suffer from the same if not similar afflictions in life.
A little compassion, understanding and empathy can go a very long way in life. There is no one who can always be nice, friendly and without days of being somewhat off-center emotionally . So give others some leeway as you would wish for them to do for you on your bad days. Remember that we all share this world we live in and we all are but human.