This statement is potentially confusing because it depends on what the word "average" is referencing.
If we're talking about _all_ investors's returns including active and passive investors, the S&P 500 index has historically provided above average returns[1]. The math allows the S&P 500 index to be above average because so many investors lose money. Think of the unsophisticated investors losing money on the bitcoin crash, or buying Snapchat at $27 last year and selling it today at $8, or trying naive strategies at day trading. And most mutual funds, hedge funds, and VC funds also provide lower returns than the S&P 500. All those money losers mathematically "bring the average down" such that the S&P500 ends up providing above average returns. This "better than average" performance of S&P 500 is why Warren Buffet confidently bet that the passive index would beat the hedge fund managers at Protégé Partners.[2]
On the other hand, S&P 500 index is often a proxy for "market average" also sometimes called "beta" or "benchmark return". The distinction is that "market average" is a different concept from "all investors' average". This means that "market average" has turned out to be "above average" which sounds like a contradiction but the math of including all the money losers shows it isn't.
[1] https://medium.com/@akshay_m/stock-market-gives-you-above-av...
[2] https://www.google.com/search?q="s%26p+500"+index+warren+buf...
the true market return is unknowable because it has to include both public and private offerings, and by definition, we can't know (in most cases) the returns on private investments, such as fine art and the like.
that's why we use the S&P 500 (or another index) as a proxy for the market return to calculate a security's beta. we don't have enough historical data to truly know how good of a proxy the S&P is (we'd need hundreds of years of data for that, iirc), but most studies consider the margin of error acceptable for research purposes.
edit: and in the long run, you can't beat the market (unless you have consistently good insider info).
For extant index funds there are trading costs and tracking error. The more correlated the markets become, the more index funds are going to be liquidity takers (paying to trade) and the further fund performance will fall behind the indices they're supposedly tracking.
The index itself defines the average (it's the benchmark that all funds use to measure performance), so a fund perfectly tracking the index has almost zero alpha. The "almost" is whatever fees the index fund charges, which lead the funds returns to be slightly below the average if they otherwise track perfectly.
Edit: Just to add, by the above definition, where you take the total return on the index as the average, most investors do significantly worse than average, a few do a lot better than average and investors in index funds make almost exactly the average.
GP might be trying to argue that alpha generation is a zero-sum game, but alpha and beta are notoriously slippery concepts. If you want to define beta as the index return, I think you're going to have a hard time convincing me that alpha is zero sum without assuming the EMH or something similar.
This is a mathematical fact. Let’s say you do better than the market because you deviate from the market weights. For each position that you have, relative to the market, there is someone somewhere that holds the complementary position. Because the agregate of all the positions is the market portfolio, by definition.
Alpha is zero sum because the total return of the market is the total return of the market. So the money-weighted average return to stockholders must equal the money-weighted average growth of stocks.
However you can design any kind of index fund for any kind of market. Many other indices aside from the S&P 500 exist which are more or less passive depending on the process and criteria used for inclusion.
Since no index has absolutely no fees, it's considered acceptable to state that indices return an average of some sort of market - with the proviso that it's actually slightly less fees and costs.
EDIT: Based on your reply to a sibling commenter it seems like you're taking issue with the claim that indices tracking a market can't be beaten by active investing in that market. I agree; to wit: that's not a defensible claim without assuming EMH, as you say elsewhere. But that doesn't change the fact that indices (ostensibly) return an approximate average of a market.