I've always wondered if the people who vehemently oppose gambling thought the same thing about being involved in the stock market? It's the same thing (unless you have inside information, which is usually illegal). Instead of saying your "making a bet", instead your "investing" or taking a "calculated risk", means the same thing basically.
Investing in stock and gambling at slots/lotto tickets/horse races is not the same thing, though I would probably place all of those things along a spectrum. Buying stock is actually buying ownership in a company, you're financing a business's operations, though there is no guarantee on principal, people typically do it with the expectation of return on their principal or creating an income stream. Financially, it's no different then buying ownership interests in a local food truck, or apartment building, or a cupcake franchise. If people weren't willing to invest in other people's business or ideas, a lot of businesses wouldn't be able to take off or grow.
To be fair, there are absolutely people who utilize stock trading to gamble irresponsibly. And while the bible doesn't explicitly say "do not buy lotto tickets weekly" I don't see it (to borrow a phrase from DJness) as good stewardship of your assets.
DJ is spot on - your money doesn't grow by sitting in a bank. Banks take deposits, loan them out, pay depositors (in this environment, a minimal amount) interest and make money off the credit spread. The purchasing power of your savings and checkings erodes 2-3% a year -- for a lot of people, it makes total sense to put some their savings towards investments for longer term goals. Doesn't mean anyone should run out and stick everything in an obscure Brazilian oil penny stock -- if you talk to a lot of elderly people they used to buy shares of railroads, phone companies, and utility companies little by little - because those things paid out regular dividends and for the most part weren't going anywhere. Or for folks who didn't feel like they had enough to buy stocks, they kept acquiring shares of mutual funds so they could buy a little bit of everything and be diversified - there are a ton of funds still in existence from the 1940s. Another thing that seems to be pretty popular around Christmas - elderly folks who gift shares of Disney stock to their grandchildren -- mostly because they get a really pretty certificate, but it makes more sense than just handing them a hundred dollar bill that won't grow to anything in 5, 10, 18 years. There are some people don't want anything to do with any kind of stocks, and put their savings instead into buying local revenue bonds, flipping homes, or renting out properties for extra income - all still considered investing, all with their own risks.
A lot of young people do themselves a total disservice by not thinking about those things, because losing the value of your money in a bank account is a real thing. It really happens. Rent goes up, produce prices go up, hopefully your income goes up, but it seems wiser to plan and accommodate for those things where its possible, than doing nothing at all or leaving it up to random lotto numbers.