Making money in business and gambling differs.
Business is basically the exchange of values, normally products and money, in a marketplace, thereby benefiting both sides. In contrast, gambling involves moving money from one person to another; one side must lose money for the other to gain money.
The labor market is a place where companies and workers exchange wages and labor, benefiting both sides.
The stock market is a meeting place where people who have money but not technology and people who have technology but not money meet, benefiting both sides just like other marketplaces.
Investing can create winners on both sides. Gambling cannot.