Speculators in theory also provide liquidity, and in theory also contribute to keeping the prices "correct" (meaning at levels that reflect what's known). But it's not like any given speculator personally cares about that; they're just looking to gamble and win. Last I heard there was reasonable evidence that more gets spent on speculation than is delivered in benefits to the economy. So you suspicion is not unwarranted.
But there's another class of people who neither create nor consume the product, but have some financial interest in something related. E.g., suppose you sell farm equipment. You know that if wheat farmers have a bad year, you'll have a bad year, because they will put off buying your new tractors. To even things out, you can use wheat derivatives to essentially buy insurance on wheat prices. If wheat prices are normal, you lose a little money. But if they fall through the floor, you make money, hopefully counterbalancing the income from lost sales.
When this activity is significant enough, it can lead to the creation of synthetic commodities. E.g., if you are in the snowplowing business, maybe you want to insure against winters being abnormally snowy. You could maybe do something with a fuel oil future. But that's kinda tenuous. Instead now you can just trade weather futures: https://www.cmegroup.com/trading/weather/
People that want to buy or sell a commodity typically only want to do a certain number of transactions. What happens if they can’t find someone to take the other side of a trade? It would be annoying to have to wait a week until someone else is interested. Moreover, they may want a different quantity than you do, or they may want a different delivery date.
There is also price discovery as you allude to. A farmer selling pork doesn’t necessarily want to have to track the details of the Chinese economy and the weather patterns in Europe just to get a fair price for their goods. Speculators help with that.
E.g. a bread manufacturer wants stability on their cost of goods, so they may buy wheat futures even though they don't ever want to receive direct shipment of wheat, they're dealing with specific regional flour suppliers but the wheat futures at a major location are a good proxy for that price.