The cause is the cost of carry, and the CFTC says so in the definition of a different term. Its glossary entry for carrying charges, "also called Cost of Carry", is the "cost of storing a physical commodity or holding a financial instrument over a period of time. These charges include insurance, storage, and interest on the deposited funds, as well as other incidental costs." The same entry then joins the two ideas: "It is a carrying charge market when there are higher futures prices for each successive contract maturity. If the carrying charge is adequate to reimburse the holder, it is called a 'full charge'." So the upward slope has an ordinary economic explanation. Somebody who buys a barrel of oil today and holds it for six months has to pay for a tank, insure it, and give up the use of the money; a contract for delivery in six months lets a buyer skip all of that, and is priced accordingly.
That explanation is why an upward-sloping curve is not a prediction. The intuitive reading of a rising curve is that the market expects the price to rise, and it is easy to reach for. But a full carrying-charge market slopes upward by exactly the cost of holding the physical goods, and it would do so even if every participant thought the spot price would be unchanged for a year. Curve shape and expectation are separate questions, and the definitions above answer only the first one.
Where contango costs somebody real money is in the roll. Almost nobody holding a futures position wants delivery: the CFTC's own investor education notes that most contracts are liquidated before the delivery date. A participant who wants continuous exposure therefore has to sell the contract that is about to expire and buy a later one, over and over, and in contango the later one costs more. Our page on commodities carries that arithmetic and a worked example of it, because the consequence shows up in the return of a futures-based fund rather than in the definition of the curve.
Contango is also not confined to physical commodities. The definition is about delivery months, and any market with a term structure of futures prices can display it, including futures on stock-index volatility and on digital assets. In those markets there is nothing to store, so the carrying-charge story does not transfer intact and the slope reflects financing and the balance of who wants the exposure. The shape has the same consequence for anyone rolling a position forward, whatever produces it.
A last point on how the word is used. "Contango" describes a market, so a single contract is never "in contango"; the curve is. And the condition is not permanent. A market can be in contango in one part of the curve and inverted in another, and can move between the two as storage fills up or a shortage appears, which is the subject of the entry on backwardation.