For analogy, consider school students trying to get all the questions right on the test. The first scenario is equivalent to one student studying hard to find the right answers. The rest of the class copies his answers and benefits from his efforts. The other scenario is no student trying hard, them all failing, but succeeding because the teacher curves the grades.
Note that both of these scenarios, especially the second scenario, results in stock prices which become increasingly detached from the economic reality of companies in proportion to the extent to which passive investing becomes prevalent.
For instance, assume stock XYZ is a bad investment but is in the S&P 500. If 90% of funds are actively managed, maybe they can sell a sufficiently large amount of it to push it out of the S&P 500 and save the passive investors from owning it. But if 90% of funds are passively managed, even if XYZ is hot garbage, the 10% of passively managed funds cannot possibly sell enough to make up for the fact that 90% of the market participants are indiscriminately buying a terrible stock.
Passive investing breaks the market to some extent. The free market system is predicated on having rational participants, not zombie participants.