I don't think this decision is good (not selling to Russians) but we can imagine much worse decisions that follow from companies yielding to, say, social pressure.
Government sanctions are applied by a democratically-elected government, which has a variety of checks and balances in it. I agree that social pressure can go off the rails. In this particular case my gut is that social pressure is encouraging them to go along with the sanctions quickly and enthusiastically.
Is Red Hat responding to sanctions? I don't think so:
> (from the link) While relevant sanctions must guide many of our actions, we’ve taken additional measures as a company. Effective immediately, Red Hat is discontinuing sales and services in Russia and Belarus (for both organizations located in or headquartered in Russia or Belarus). This includes discontinuing partner relationships with organizations based in or headquartered in Russia or Belarus.
What we're seeing is the social outrage machine taking its turn at geopolitics. We'll see how that goes but I am not optimistic.
I don't think any of this helps Ukraine but I'm more worried about the precedent it sets.
Second, "social outrage machine" is a pretty ridiculous characterization. You're painting this as if it's some Twitter mob upset about a minor grievance as opposed to the reality that a hostile country is committing war crimes.