For reference: https://www.gamesradar.com/ps5-is-being-sold-at-a-loss-but-h...
For both game consoles and phones (mostly on the iOS side) the post-sale revenue is part of the overall profit scheme - PS5 hardware is sold very near-cost but all the money Sony makes off PSN and their cut of game sales becomes profit. Apple makes up-front margin from the hardware but also expects profit from in app purchases - if that wasn’t guaranteed, they might raise prices to make up the difference. Is it anti-consumer? Probably, for both the game console side and the phone side since the consumer ends up indirectly paying more after purchase.
To make money on reselling games from Blizzard, EA and others you have to be an insanely talented buyer and have very little overhead.