It really isn't, because your "simple" comparison is bunk. For one, it's measuring stock vs flow. Stock prices measure stock, eg. the size of a piggy bank. Salaries measure flow, eg. your annual salary. Directly comparing the two results is meaningless. It's easy to demonstrate this with the piggy bank example. If your salary was 50k/year, you saved 5k/year, then your piggy bank would be growing much faster than your salary growth, but it doesn't say much about the economy, or whether you could quit your job or not. In fact, if you started with $0 in savings, your piggy bank growth would be infinite, which really shows how absurd stock vs flow comparisons can be.
Moreover stock prices incorporate a variety of factors that are irrelevant to wealth distribution. Low interest rates makes stocks more valuable by reducing the future discount rate, and corporate consolidation makes stock indices go up, but neither of those factors directly affect inequality. For instance, a simple DCF model would value a company with earnings of of $1/share/year at $16.67/share if the risk free rate was 6%, but $33.33/share if interest rates were at 3%. However it's unclear whether such drop in interest rates would double inequality, as a direct comparison would imply. After all, most people hold on to debt (eg. mortgages) as well savings.