Likewise for asylum seekers, it's illegal to cross into a country without permission. You can flee, apply for asylum, and enter when that asylum is granted. There are also rules on when, where, and which countries you're allowed to apply for.
These terms and concepts are not difficult, if you have no intention of misconstruing or creating outrage.
Applying does not give you permission to enter a country, that's only once you are granted protection. Depending on the circumstances, sometimes temporary entry is allowed. However if you're inside the border without permission then currently you're detained instead of immediately deported while the case is processed to help asylum seekers.
Those are the rules, and as a legal immigrant and naturalized US Citizen, I have absolutely no fear of deportation.
Or in the case of asylum seekers and refugees, what is effectively being said is that it's illegal for them to flee a war zone?