> inexplicably high cost of hot black coffee

My guess: if the prices reflected the marginal costs of the product inputs, amortised machine wear and ingredient storage and handling and the labour to make, black coffee would be so much cheaper that it would attract too many people away from higher-priced, higher-margin options.

Prices are based on analysis of the effect on demand rather then as a representation of the cost of the item to produce relative to other products.

McDonald's for example has cheap black coffee, because it's an incentive to get you to buy some overpriced food at the same time. Whereas a coffee place is primarily just selling the drinks.