Most transactions in the market are not gambling. Trades happen, yes, but that is because the prospects of companies are continually changing. When it became apparent pretty much everyone would move to Netflix and streaming video, would you want to continue holding Blockbuster stock? No; you would want to sell it.
People who simply "gamble" in the market lose money about as often as they gain it, and soon stop. Hedge funds and mutual funds generally try to invest in shares on a longer-term basis rather than continually trading them; trading incurs transaction costs, and if an investment was correct and is generating better-than-benchmark returns there is no reason to sell it.
The "day trading" books you might see at your local Barnes and Noble are get-rich-quick books and are not representative of the actual professional investment industry.