Most (non-western) countries do pretty well by making it clear that those who enter illegally will be arrested, charged, imprisoned, and then deported (at their own cost) rather than given free benefits.
Believe it or not, the UK already does this to people for whom there is no plausible asylum claim. The problem, if you want to think about it as such, is that the UK currently believes in treating potential asylum claimants as such rather than automatically labeling them as criminals.
This may be technically correct but only because the definition of "potentional asylum claimants" has been expanded to include pretty much everyone.