Good, then you're in agreement with basic human decency. That isn't what appears to be happening at the US border, however.
This doesn't change the fact that priority should be given to legal migrants and not criminals with children in tow.

Relevance? Are you suggesting the government is equally responsible to go into a war-torn country and feed and clothe people, as it is to do the same with refugees that show up at its border?
I'm merely questioning why only a tiny fraction of the population are turning up at the border. If staying in a country is more dangerous to your children than attempting to cross a border illegally, something is very wrong in that country.

It's not about fleeing danger, it's about wanting a better life. Or to put that another way... it's economics.

First, they're not all trying to cross illegally. Many are presenting at the border to seek asylum. They're also being put in 'camps.' Second, if some are crossing illegally they should be given low priority for asylum status, but they still need to be fed and housed in appropriate conditions.
Turning up at the border is not the way to apply for asylum. Not unless you're in immediate danger. People who turn up at the border unannounced should be turned back.

Not sure exactly what the laws are, but there seems to be an international consensus that you need to deal humanely with refugees dragging themselves to your border.
Nope, just the ones who successfully cross the border. Why does USA have to comply with "international consensus" but not Mexico? Those on the Mexican side are Mexico's responsibility.

And I'm fairly sure the humane treatment of prisoners is guarded by international law.
Yep. Like I say, I agree detainees should be fed and cleaned. But there's no obligation to admit migrants in the first place. If they're on the Mexican side, they are not America's problem, they are Mexico's/

The latter.
What's wrong with Mexico?

It's ok, I know the answer... economics.

Why not? If you can get to the country of your choice, what does geography have to do with it?
A nation state has a responsibility to its citizens, not the world's population.

That's not how it works lol.
We're talking about rights here, and it's exactly how it works. Syrians do not have an automatic right to settle in the UK. The French do, currently.

If you're fleeing a dangerous situation where you live, you have a right to asylum in the country of your choice.
Do you think people have the right to seek economic opportunities in whichever nation on the planet they choose?