Well, they're not selling you the game. They're licensing you the ability to play their game.
And yes, I think it should be legal for a hardware product (like Spotify's "Car Thing" https://en.wikipedia.org/wiki/Car_Thing) to stop working because they don't want to support the online component. It's fine to get mad at the company, but I think it should be legal to do.