Well, in the wise words of someone here:
A for-profit [law firm's] primary responsibility is to generate returns for its [partners]. It’s the reason they’re formed. They wouldn’t be formed but for that purpose. Thus the “for-profit” distinction.
The other positive and desirable things companies do — like providing goods/services people want and need, creating jobs, paying taxes, buying from suppliers, making charitable donations, etc. - are all secondary to this.
And there’s really nothing to regret or lament about this. The secondary positives are still positives. And it doesn’t necessarily mean the only consideration in anything they do is maximization of profit.
But, for whatever reason, a lot of people struggle with this concept.