Having some similarities doesn't make gambling and investing the same thing.
You're right, of course. But having similarities goes a lot further toward making them the same than making them different.
This is a semantic issue to a great extent, depending on how we define the two words, invest and gamble. What I find important to remember (you may not) when I put money in index funds is that I really don't understand the forces that make the indices go up and down on a year-to-year basis very well, and I have zero influence on them. I'm just betting that they will continue to perform more-or-less as they have performed in the past. I read books and try to diversify holdings across sectors and markets, but this is just using historical results to try to hedge bets a little bit. Does this make my investing different from gambling? It doesn't feel too different to me, only like the odds are stacked more in my favor...kind of like being the house at a casino rather than the customer. Both are gambling.
What would feel different to me would be if I were involved with the capital I'm investing...where I had expertise in the actual use of the capital, and where I could evaluate and manage the risks of the use of the capital (not just which stocks to buy). Then the investment wouldn't just be betting on how some stocks perform. In fact that's what I do at w*rk. I help evaluate and manage the risk of the direct investments my megacorp makes. We invest in hundred million dollar projects that may only have a 20% chance of success. An 80% chance of losing one's full investment may seem like gambling to some, but we are expert at identifying the cost of the investment, the chance of its success, and at evaluating the value of successful projects. With a portfolio of projects like this, the numbers can pencil out. The company is over 100 years old and valued at over $100 billion, so routinely investing in projects with an 80% failure rate can be quite an effective investment strategy. To me the difference between investing and gambling isn't so much the level of risk being taken, but the level of control one exerts on the use of the capital.
I now realize that others may have a different view on this.