They weren’t just random Russians, they were working for companies under sanctions.
That's just false. First, nobody in the maillists claimed those specific people were working for sanctioned companies. Second, at least one of the banned maintainers, when advised to contact their company's lawyers, said he isn't working for any company at all, just freelancing and doing free work for the community.
What were they supposed to do? Ignore the sanctions?
Yes. It was(and probably still is) literally written on the Linux Foundation website that the US sanctions do not concern open source community. It goes against everything open source ideology is, that is code and contribution is all that matters.
And what's worse it raises serious concerns what other malicious actions to the Linux kernel and other projects Linus and LF had to take on demands of the government that likes to install backdoors in software.