I don't know if it is or should be illegal but I can see why it raises some questions.
No, you're betting on the stock's future performance, not the company's future performance. There's an ocean of difference between the two.
If the company does poorly, but the stock price rises, or stays the same (Say, because we're in the middle of a COVID recession, and the printing presses are working overtime), you're going to lose a lot of money.
How do you know that everyone who bought it actually doesn't care about Gamestop's worth? There isn't really any way to prove that every single person (or even a majority of people, or really even a good portion of the people) don't care about GameStop's success and are solely doing it as a metagame.
Sure, there's threads on WSB about this, but there's no real way to tie that to actual transactions, and not everyone who has bought stock even contributes to that subreddit, let alone the specific threads about this.
Furthermore, all it really takes is someone saying "I bought stock because I believe in the company". We don't have thought police; unless someone explicitly posts "I, RH account XXX, bought the stock in a concerted effort to short it" there's no real way to prove intent.
Also: If a big hedge fund shorts a stock, expecting to drive its price down, that's cool. (Search "big short drives down stock price")
But if regular people buy a stock expecting to drive its price up, that's terrible.
Sorry, this position just isn't credible.