The above post is good advice for the most part. There are some times when you have to just sit there and take it silently being the exception, because no matter what the other person is perhaps toxic. That is, they are totally negative and won't listen to anything. All the same, those responses aren't bad.
Yet again, remove yourself mentally from the situation for a moment in order to understand it. View from 20,000 ft above:
The other person is foolishly attempting to bend the universe to their will. You are a part of the universe, ergo, they try it with you too. That, or they are being emotionally immature. EQ, much like IQ, is a measure of how smart you are concerning emotions. These people are tossed in a tempest they can't see and don't know how to make themselves feel better, so they flail around foolishly. They are unaware and refuse to be aware that they are stupid.
Some examples of mistakes made by people who don't understand emotions:1.) [Insert list of problems in life] so someone will yell at a cashier or low level employee who has no control over anything? That won't solve anything, but it makes people feel better, kinda but not really. They think it does, because it lets them vent.
In the real world, viewed from 20,000 ft up, this is that person barking up the wrong tree. They're crying in the rain. Won't solve anything.
2.) [Insert undesirable situation here] so someone will look for someone else to blame. The flawed logic is that if [scapegoat] would only do X, then this problem wouldn't be here! Guess again. This person is fighting over who to blame, not what to do / how to solve things. Sad.
In the real world, problems happen, it often doesn't matter who "caused" them. Spend half the time complaining on fixing them, and it's solved. To some point, this may benefit from nicely, politely pointing out a preventative measure. Notice the "nicely, politely" part. Sadly, few do. This is the difference between constructive criticism, and just plain old criticism....
3.) [Insert problems here] so someone will make impossible demands. Yes there are problems. Some can be solved or helped a bit, some can't. Demanding perfection won't work. Eastern religions have often focused on "harmony" or "zen" because perfection is an unattainable moving target. Yes, try to be good, productive, and efficient, but overdoing it has its own problems.
4.) [insert problem here] so someone will demand answers why the universe isn't how they think it should be. Similar to some of OP's recently provided examples, the universe is a thing that doesn't have to answer anyone. Therefore, it doesn't.
In the real world, demanding someone else answer a question is abdicating the personal responsibility of thinking and foisting it on that other person. It is imposing a duty to explain why the universe doesn't act a certain way. Note, this is the opposite of science where you have to confirm your hypothesis instead of demanding to know why it doesn't work (known as rejecting the null hypothesis). You don't demand to know why humans can't fly, because it's not a useful answer. You ask the universe how you can fly and figure out the airplane while the complainer is left grounded....
In all, you recognize, realize, and reframe. Recognize the weaknesses of these poor, blind souls caught in the great emotional tempest. Realize it can't be helped and they would fight you for trying. Reframe your awareness of the situation.
Ultimately, retaining your composure (in the face of all this foolishness) is the only real source of power anyone has. Others may try to get a reaction out of you, because they mistake that reaction for understanding/caring and the lack of it for lack of those things. After all, they falsely reason, anyone who understood what they understood would be reacting the way they are (badly). False. The trauma room surgeon sees horrors every single day, many times a day, and knows he or she has a dozen more mangled patients waiting once this one's patched up. Imagine the emergency room doctor having an emotional reaction every time he seems a horridly injured car accident victim.... That wouldn't help anyone.
Instead, the ER doc looks at the situation from 20,000 ft above and assesses it rationally. They know the broken arm, fractured humorous bone, probably hurts like hell and is horrible, but
this fact doesn't help anyone. That's why it's not immediately relevant no matter how much the patient complains of it. The ER doc has to deal with patient number 27 for today's (perhaps justified but not useful) bitching as a symptom while faking a concern (bedside manner) and mentally calculating which drugs to administer at what dosage while watching out for chemical interactions, and what treatments to perform. THAT LAST SENTENCE does matter and is immediately relevant,
because it might fix things. In any event, the patient will still complain (again perhaps justifiably) and the doctor has to just work around it, because it isn't going to stop for a while at least. Apply this to other situations. That is ascension above the tempest waves.
I hope this helped somewhat.