Suppose a farmer wants to lock in the price of milk produced the farmer's dairy. The farmer wants to sell futures and sees a market of 18.30 / 18.50. These prices are probably being shown by a market maker. The farmer sells the futures to the market maker at 18.30. A few minutes later, Starbucks would like to buy the same contracts, to lock in its costs for the next month. Starbucks buys at 18.50.
These two participants have paid the market maker, in total, 0.20 in spread. Here, the spread is the fee the market maker charges for facilitating liquidity. At this point, the net sum between the three participants is still 0. However, we also need to factor in the fees charged by the exchange, any taxes that may be charged on the transaction (for example the SEC fee in equities), clearing fees, and funding costs.
On the whole, the transaction between the three participants was negative sum. However, the market maker is running a business by reflecting those costs, and the risk premium, in the spread. Even though this transaction is negative sum, it, presumably, still provides economic value to the farmer and Starbucks.