The Flintstones is a well known cartoon. Using these characters to advertise a product takes something that children already love and gives it more meaning. Again, these commercials get put into a child's memory bank, and the companies hope is that the child will one day ask for the product. Toys are another way in which children are targeted. This is the answer that some companies keep in mind when advertising their product.
Cracker jacks is just average caramel popcorn until a toy is put in the box and advertised.
The hope here is that the child will remember that a particular brand has a toy in it and will therefore ask for that particular product. Cereal companies are also famous for this type of advertisement. The huge competition between the companies has caused a need for them to somehow sell their products better. If they put toys in the boxes of cereal, children are more likely to want the box with a toy in it. Fast food restaurants also advertise to children.