In this context the problem is that buying into an index fund does beat the market, because it simultaneously creates and then takes advantage of a bubble in the price of stocks in the index. The price of indexed stocks goes up because index funds are buying them. Then people buy into index funds because they're going up.
In theory non-index investors will then sell the indexed stocks once they're overpriced, but they can see the feedback loop. If more people are expected to invest in index funds in the future then the future demand for indexed shares will be even higher and the indexed shares will be worth even more tomorrow, so they become part of the bubble instead of correcting it.