Derivatives are not exactly zero-sum.

a) Imagine a coin tossing game. We both put in a dollar and flip a coin; heads you win both dollars, tails I win both dollars. Truly zero sum.

b) Consider a vendor selling me a $5 hamburger for $5. They lose $5 worth of goods and gain $5 worth of cash; I lose $5 worth of cash and gain $5 worth of goods. In an accounting and physics sense this is zero sum; no dollars or molecules were created or destroyed, the universe just slightly rearranged itself. But in economic terms, this isn't a zero-sum transaction; the purchase created value since at that exact moment I valued the hamburger more than the cash (due to hunger), and the vendor valued the cash more than the hamburger. We both improved our situation and created value "for nothing". After eating the hamburger, I satiate my hunger, and now value a second hamburger less than $5, which prevents a second trade from happening for a few hours.

c) Let's say I'm a wheat-producing farmer and you're a wheat-consuming baker, and there are thousands of others like us in the economy so neither of us really has any effect on wheat prices. When the wheat price is up, I benefit, and when the wheat price is down, you benefit. At this point we have a zero sum situation. Now let's say we're both reasonably content with the wheat price being what it is right now, so we sign a "futures" agreement for me to deliver wheat to your bakery for the next year, locked in at the current price. By signing the contract, I'm choosing to forgo extraordinary profits next year if the wheat price happens to go up, but also insuring myself against extraordinary losses if the wheat price happens to go down. Your end of the bargain is the same thing in reverse.

Like the hamburger example, in an accounting sense this is zero-sum. My potential profits are exactly equal to your potential losses, and vice versa. But in an economic sense, there was another quantity that was affected in this transaction: risk. Both of us reduced our wheat price risk to zero for the next year. Risk is something people intrinsically dislike, so it has disutility (i.e. negative value). Eliminating a negative therefore adds value.

As a concrete example, let's consider what would happen if you couldn't sign the futures contract above--let's assume no modern banking or finance at all for this example--and had to just accept wheat price fluctuations. Overall, on average, the highs and lows should more or less cancel out. But on a short-term basis it's not unlikely at all to have a run of 3-5 years of bad prices (too low for me, or too high for you). To survive this potentiality, we'd both have to set aside a considerable rainy day fund just in case I had to cover 3-5 straight years of depressed profits or outright losses. Most of the time this cash will be unused, but the mere threat of a prolonged unlucky spell means we can't use that cash to buy more land or tools. The net effect on all farmers and all bakers is that everyone has a large chunk of their wealth sitting around in a completely unproductive state, which ultimately means less loaves of bread are produced and society is relatively impoverished.

Likewise, other financial derivatives like options, swaps, etc., also create economic value. They might be zero sum in a cash sense, but they affect some more-abstract quantity like "risk" or "leverage" and therefore create value for both buyer and seller.