But there will still be people who equate the perception of both. Because there are indeed traders who treat trading like gambling. They might think they are doing analysis, but what actually happens is that they rely on feelings and instincts to open trade positions. It's the same for those who gamble.
Conceptually, trading and gambling are different. But whether trading is gambling or not will depend on the trader.
We cannot call someone a trader and that person is trading when they open positions based on emotions and luck instead of knowledge and analysis. In this case, he is a gambler and is gambling not investing or trading. He just used trading to cover up his gambling.
However, it cannot be denied that gambling and trading have many similarities and many people have abused them, so it is inevitable that people equate them.