Legendre transformation arises naturally in microeconomics in the process of finding the supply S (P) of some product given a fixed price P on the market knowing the cost function C (Q), i.e. the cost for the producer to make/mine/etc. Q units of the given product.