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/