Amit Patel wrote about a 1996 piece from Hal Varian on differential pricing:

I had thought that charging customers different prices for the same thing was unfair and the result of pure greediness. But Hal Varian explains why “differential pricing” might be better than fixed pricing, especially in industries with high fixed costs. One of the arguments boils down to: if some people are willing to pay more than others and the fixed costs are high, then you can end up in a situation where it is worse for the consumers (as a group) to all have the same price than to have different prices. The producer usually benefits from differential pricing, but in many (most?) situations the consumer does too. One case in particular is when the producer would go out of business without differential pricing; there is no benefit to the consumer of losing the opportunity of purchasing a product or service.

My sense of fairness says you should charge the same amount for the same thing, but the math shows that society is (overall) better off with less fairness.

“Fairness” is in the eye of the beholder.