Speculators are the counterparty hedgers need. A farmer wanting to sell forward has to find a buyer, and there are rarely enough consumers willing to buy at exactly that moment and size. Speculators fill the gap, absorbing risk in exchange for an expected return.
That function makes them structurally useful and politically unloved. Every commodity price spike produces calls to restrict speculation, though the evidence that speculation causes rather than reflects price moves is weak. What speculators unambiguously provide is liquidity and tighter spreads.
The regulatory line between speculator and hedger matters in practice: speculators are bound by position-limits with no exemption available, and they must be out of deliverable contracts before first-notice-day.
Example: a fund buys 2,000 corn contracts on a drought forecast. It has no grain, no storage and no intention of taking delivery; it will be flat before the delivery period and its profit or loss is purely the price change.
Related: hedger, position-limits, managed-money, non-commercial-trader, liquidity