The only investment in gambling is if you are investing in the casino bankroll.
Playing on the casino means you are exposing yourself to the risk of losing money and I dont consider this as investment. In investments you have some asset in hand at the end of the starting transaction, like a stock/share/stablecoin/altcoin/fiat. In gambling you dont have that, you have put the money in the machine and its gone already, unless your luck is good and you get it back with something extra.
Games of luck cannot be considered investment in my opinion, however certain people might want to stretch it a lot.
I remember those old casino which I choose not to name that offers investment to their gamblers before. Then their investors got small percentage of dividend from them. But majority of those casinos is not existing now and maybe they failed from doing it and many people are not satisfied with returns gotten.
But if they are just playing the casino games what casinos offered, its so clear that this is not an investment. If there are people thinking that it seems that they are been misled and got wrong information. Real investment is they got a share from company or have some asset gotten on hand from the capital they spent. People just stretch to much its definition, but those games which they can earn if they are just lucky doesn't give them any value if they aim profit and think about investment matters.
This is why gambling is good to determine as form of entertainment, rather call it as investment since maybe what they can only earn is just pure disappointment.
Your friend doesn't know about gambling and investing. If he did, he wouldn't equate the two. Gambling is more about taking a risk based on chance. Investing, on the other hand, involves putting your money into an asset with value and expecting a return. The two are distinctly different no matter how you look at them.
So, your friend is just being ignorant and trying to act smart, when in reality, he's just showing off his ignorance.
Yeah it seems he really don't know about it and maybe his friend only consider the chances to earn, but never consider the mechanics and different risk involve with those matters.