They are explicitly not to maximize the number of people who can benefit from a product in the short term, but precisely to limit it so the inventor can make more money.
The idea being that in the long run the inventions it incentivizes outweigh the people who are limited from benefiting in the short term.
Judges aren't in the position to weigh societal benefits in each individual patent case. Your framing implies that cost-benefit tradeoff. But that's not how it works. The only question is whether a product infringes or not.
By that same logic, my landlord's interests and ownership of his property are categorically less important than allowing his tenants access to their apartments.
Which is, like, a way to structure a society, but is not the way that American society is structured.
Here in America this is part of our culture: your health gimmeck features are precisely meaningless to the court if the prosecution can prove wreckless harm on Apple's behalf.
Apple pays tons of patent fees in all sorts of areas so tons of companies. They just thought this company was small enough that they could bully them into not having to pay. When that failed, they tried to crush them and force their hand.
While I'm against software patents on principle, Apple acting like some kind of stereotypical 80s movie evil corporation infuriates me just as much.