They can but at that point they will be detained to see a judge who will decide their fate. At that point, that is why the children were removed as stated in international law and US.
That is not entirely correct on the matter as
The European Court of Justice (ECJ), supreme court for the European Union (EU), has ruled that would-be migrants must seek asylum in the first country they reach.
They should be seeking asylum at the first country but they do not want to be there so they circumvent that or mexico fast tracks them to the US denying them asylum but the law is there. It may not always be enforced but it is there.
While that is correct, so is this:
"The European Union's top court has ruled that refugees must continue to seek asylum in the first European country they reach, even in exceptional circumstances like the migrant crisis of 2015."
Now, you can claim Mexico is not a safe place and you'd get no argument from me but the rule is there enforced or not.
https://cis.org/Cadman/Why-Shouldnt-...-Asylum-Mexico
Then you have to take into account that the reasons why they claim to leave a county do not apply to the majority of asylum seekers. Poor economy, drugs and gangs do not grant asylum. Are they persecuted under the asylum rules? Either way, while they apply for it, it doesn't in most cases actually work for the reasons they give. They are not being persecuted or have a fear of persecution because of their race, religion, nationality, membership in a particular group or political opinions. So it rarely applies. They also fail to receive refugee status for that same reason.
It rarely applies for our southern immigrants.
but yes. We do have first country rules even if rarely used.