Competition is the driving force for these advertisements. For example, McDonald's has the Happy Meal, Burger King has the Kid's Club and Wendy's has the Kids Meal. The only difference between these, is the toy which accompanies each meal. These companies hope that when a child is asked where they want to eat, the child will answer their restaurant. This will increase their business.
Competition is the basic driving force for why companies have added toys to their products.
Children, by nature, are very competitive. They strive to get something that no one else has. A child loves to be the first one on their block to have the new toy, to try the new cereal, or to own the new outfit. Advertisers know this and try to use it to their advantage. With all the similar food in the world, there is competition to sell a certain brand.