'De-listed' stocks are another factor - the worst performing stocks are removed from the exchange, giving a higher average. Inflation itself is a very tricky thing - technology is very deflationary but this is ignored by the market basket.
If you investing in a mutual fund that is replicating the S&P 500, for example, it doesn't really matter except for transaction costs.
If you are using the S&P 500 as your baseline (e.g. to decide if an investment strategy is worth the effort) it doesn't matter at all.
If you are using the S&P 500 as a metric about the economy... it might matter. If there is frequent turnover in the composition it might indicate that the market is very volatile... (someone with more knowledge can probably tell me if this is true or not).
The return of the index can be replicated even when stocks get delisted (an investor sells the stock that gets delisted.) When a new stock is added to the index, an investor buys this new stock.