Providing different prices to different groups of people does not result in "everyone winning". It's a classical example of market segmentation, price based on the average ability to pay of someone who holds the currency. It entirely benefits the airliner, and their profits, to be able to do so.
The "hidden city" tickets? A cheaper ticket to go from A->B->C than A->B is a deadweight loss in the market (assuming competitive markets). Prices are not reflecting costs, and airlines again are segmenting based on ability to pay.