If you just mean a closed group of people are passing around stock among each other, never able to collect a dividend or add new participants, then sure such a system would not be positive sum.
But the participants listed, pension funds, banks, HFTs, etc... are not just trading with each other in a closed system. These participants can all trade with each other and all gain from one another precisely because there are dividends paid out, and new participants.
Pension funds need to liquidate or rebalance their portfolio on a short notice or daily basis, so they benefit from trading with HFTs who can take on virtually arbitrary inventory and quickly hedge it, charging a very small and implied fee (usually from a spread or some other implied mechanism), who in turn offload that inventory onto a bank or another pension fund, etc etc...
These participants can all benefit from one another's involvement in the market instead of competing against each other.