Indices are a measure of market performance, they are an average of the performance of all investors.
Since trading between mutual funds makes up the vast bulk of investment trading, indices can be regarded as a measure of the average performance of mutual funds, before fees. That is why the average mutual fund will always lag the index by the amount of the fees.
ETFs that track an index get a free ride, they follow the investment performance of the average mutual fund but without the fees. On average, ETFs will always outperform mutual funds.