How do illegal immigrants get into countries?
Bear in mind that most countries have very long borders, often in the thousands of miles, and it is not practical to watch the whole border all the time, or to fence it off (and even if you did fence it off, it is possible to get through or over a fence if you really want to) so people just sneak in. It is only if you enter at an approved location, such as an airport, that the customs and immigration officials can check to see if your arrival is legal. And even then, some people used forged documents to get past customs and immigration officials. Some people hide in shipping containers, although that is very risky. So there are lots of ways.