Is it still though? They have been pushing into various industrial and commercial markets. There was talk about Raspberry Pi Trading planning an IPO this year [1].
There are companies now that are basing their entire product lines around Raspberry Pi's Compute Modules. This then drives demand for other Raspberry Pi products as well. When you're deeply invested into that ecosystem you also need Pis 3s and 4s for builds, testing, development, etc.
It would also make every decision that the company makes from here going forward one of fiduciary responsibility to the shareholders. For a project rooted in affordable open-source hardware/software that's a major conflict of interest.
I get that "Raspberry Pi (Trading) Ltd" is not the Raspberry Pi Foundation, but it is wholly owned by the foundation as a subsidiary. IMO, it'd be of major concern if any RPI business entities went public.
Either way, your "as long as..." conditional statement may be logically consistent, but the condition is by no means guaranteed to be met.
Nonetheless, a lawsuit is possible as well. Foregoing profits in favor of ideology could conceivably be a breach of fiduciary responsibility, a primary cause of shareholder lawsuits. You may be right that there has never been a lawsuit like this about too-low prices, but I simply don't know. And unless you're a corporate lawyer with extensive shareholder lawsuit experience-- or happen to have some legal experience and a subscription to something like Westlaw-- then you are making an unfounded guess.
I have a friend w/ Westlaw access, among other databases, but I'm not willing to ask them to spend a few hours researching the issue to see if there's every been such a case, or try to find one myself. But in the history of corporate lawsuits it certainly wouldn't surprise me. There is a body of caselaw that could encompass it, predatory pricing (https://www.justice.gov/atr/predatory-pricing-strategic-theo...). Selling significantly below the market-clearing rate demonstrated by scalper prices might provide some ammunition for this claim, but IANAL so I won't speculate further on its actual applicability.
If you have more direct expertise or knowledge of the caselaw there I'm happy to hear it. I think, absent completely recalcitrant corporate leadership on the issue, shareholders would force the issue outside of the courtroom.
The current big problem is that 2 years of Coronavirus pandemic and the active Russian beligerance have created unprecedented economic disruption, effectively ending the prosperous times following WWII. We are no longer living in the same world, and expecting things to be cheap and plentiful is no longer a practical frame of mind.
The best known way to allocate meager resources for best possible use is not to interfere with the free market. And anybody who disagrees and tries to do otherwise will learn this fundamental the hard way.
It is too bad that there is really no viable alternative to RP. The current competitors do not provide good ongoing support and are only compatible with specific versions of the Linux kernel, or modified versions of the Linux kernel. I suppose eventually a credible competitor will rise up maintaining good support, without any fair price manipulation BS, and with less weird hardware quirks, and everybody will just switch over to that platform.
But scalping is a totally separate issue. They provide fairly minimal value if any, to anyone but themselves, while raising prices for everyone.
I don't really see why a non profit organization should have to support a use case that is detrimental to many people.
The "free market" is a bad idea in scarcity times, as the only ones able to pay the profiteering prices will be the rich and wasteful, and ordinary society is left behind. Just look at the PC market where shitcoin miners have completely ruined the supply chain - it's still almost impossible to get decent GPUs at a decent price point after years, and there have been serious though temporary impacts on deliverability of RAM and HDDs with other shitcoins. Or with rental markets where entire city quarters are either taken over by AirBnB-style operations (because ultra-short-term "hotel" rental yields sometimes up to 4x a month what regular renting would allow) or left idle as "speculative" assets (e.g. Londongrad).
To make it worse, when scalpers buy up the remains of the available inventory, that inventory gets locked away from being used productively by anyone as scalpers have an incentive to keep their inventory off the market to drive up the price even more!
In times of resource scarcity - no matter if food or anything else that's critical for society - a good government steps in and limits the free market (e.g. by banning cryptocurrencies or scalpers, by introducing quotas or by introducing vacancy taxes) so that at least some movement of goods happens.