This was the right decision from the U.S. Supreme Court.
Nobody questions the fact that there are places like the Northern Triangle countries of Central America where people live in legitimate fear. But if you're seeking asylum from one of those nations, you should do so at the first country you come to where you're no longer in jeopardy. (Mexico, in this case.)
You shouldn't be able to continue traversing another 1,000+ miles through Mexico in order to make your initial claim of asylum in the U.S. That's an abuse of our asylum policies, and places undue burdens on our severely overwhelmed immigration system.