Asylum is not entering the country illegally, it has a legal process. It is not a non-sequitur, it is the topic under discussion.
1. You are being persecuted for something like religion or ethnicity. Poverty and ordinary gang violence doesn't count.
2. You must declare asylum in the first safe country you reach. Given that both Canada and Mexico are considered safe countries, it is extremely difficult to meet this requirement. You'd pretty much have to sneak onto an airplane without being caught.
https://www.pbs.org/newshour/show/migrant-seeking-asylum-say...
You may apply for asylum regardless of how you entered or your current status.