I’m not aware that the US process asylum applications from folks not on US soil. And the visa laws typically require you to either be a student or employed. Of course either of those could be fixed if you wanted fewer illegal border crossings but really most Republicans right now just seem to want fewer brown people.
i googled the issue after bubbles posted, because i didn't know the answer and didn't wish to choose to remain ignorant. a foreign national can apply for refugee status on foreign soil or seek asylum in us territory. other than the different names, the status is about the same (and very annoyingly, if you're trying to google it, often used interchangeably).
the us sets a cap on how many refugees they allow into the country each year, and they do so by region. by treaty, they must provide an asylum hearing to any asylum seeker. the cap for refugees from central america was 4-5k/year during the last few years of obama and 2017, for 2018, trump's administration reduced that to 1.5k. in 2015, obama's administration instituted a program to try and shunt minors (and later, also some family members of minors) into a program to provide expedited processing of refugee status rather than have those minors show up on the border seeking asylum. this didn't increase the number of refugees, it was just supposed to prioritize minors that met the criteria and expedite their processing. at any rate it didn't work terribly well but was chewing through most of the refugee slots by the end of 2016. trump ended the program in 2017.
so basically, that's (probably, mostly) why people don't apply for refugee status at us embassies instead of making what by all accounts is a brutal and dangerous trip across central america and mexico to show up and petition for asylum at the border. there is far more demand than there are slots available.
oh, and if you're wondering why they're choosing to seek asylum in the us, when we obviously hate them, rest assured most people fleeing honduras, guatemala and el salvador are choosing to seek asylum elsewhere. there's just a lot of them leaving.