Firstly, Imigration officers did a great job by sticking to the rule book. Here the question is "Why was the RULE BOOK closed for the French national by allowing a Transit VISA?".
Parents / Passengers should be more careful while crossing International borders. It is not as simple as shown in movies.