> How do rich people make money in the stock market if it's a "scam?"
Definitions:
scam (verb): to obtain (something, such as money) by a scam
scam (noun): a fraudulent or deceptive act or operation
together: to obtain (something, such as money) by a fraudulent or deceptive act or operation
Rich/powerful people obtain money and influence by fraudulent or deceptive operations, via the stock markets, from less powerful people, by convincing them that they should participate in said market, either as small investors or indirectly by having their banks, insurance, and pension invest into the stock market.
The rules, and conditions on the stock market are in such a way that they reward power and wealth with further power and wealth. E.g. being able to invest into better locations, infrastructure and connections for HFT, being able to hire better analysts and more mathematicians, invest into satellite data and machine learning to track cars in parking lots to estimate the results of earnings calls, pay lawyers and lobbyists to change influence politics and change laws.