I actually used Kinder Surprise eggs as a case study in a masters paper. To answer the legal question, the 1938 Food, Drug and Cosmetic Act is the law most cited to justify the embargo on Kinder Eggs. Because a toy is kept inside a confection, Kinder eggs are embargoed from point of entry into the US.
As someone who has given Ferrero Kinder eggs to my children while living in Europe, I can state that for a child over the age of three, these eggs are perfectly safe. The capsule holding the toy is too large for a small child to swallow, and is almost impossible for adults, let alone children, to open easily. Plus there are plenty of warnings on the foil packaging advising parents not to give the confection to children under the age of three.
While conducting research on this paper, I discovered that Mars actively lobbied the US government to have confections with interior toys banned any time a similar product comes on the market. For instance, in 1997, when Nestlé tried to introduce (the similar) Magic chocolate balls in the US, Mars was instrumental in promoting civil action to prevent the marketing of this product.
And believe me, getting caught trying to ‘smuggle’ Kinder eggs into the US is not much fun. We had friends travelling into the US from Canada who packed 10 Kinder eggs in their luggage for their children (all over the age of five) for Easter. Customs and Border Protection not only confiscated the Kinder eggs, but also fined the family $1,200 [£787] per egg, or $12,000 [£7,870] total. So, don’t try this, unless you’re willing to pay a hefty price.
As already written, US regulation does not allow placing a ‘non-food’ object inside food, but only if it is not visible from the outside.
But there is a similar product available that copies the Kinder Surprise egg but dodges the US regulation: the capsule containing the surprise is partially visible between the two chocolate halves.
If security is the goal we want to reach we should start considering banning hot dogs, salted peanuts and all the foods (many of which are man-made) that cause hundreds of choking deaths worldwide.
On the other hand, the Kinder egg caused three fatalities in 40 years according to Wikipedia, which is a pretty low chance of injury considering the billions of Kinder eggs which have been sold around the world.