I don’t think people buy happy meals for the toys. You know what you’re getting to eat, which is the purpose of the chain. It is a food service company, not a toy manufacturing company and the toys are only tokens of appreciation for the customer.
EA is a video game company and your experience and ability to play the game basically depends on these loot boxes. In fact, you play or pay to increase the chances to get a good deck, but nothing is guaranteed. It is random or perhaps even more perverse, it is programmed to deny or condition good players on your decks to keep you playing for the next loot box.
The only way this is not gambling, is that you don’t win money at the end of the day. Just satisfaction.