> if i were to visit any country, and then just randomly stay and try to get a job, I expect that it won't last long. why is this not the case for people that come here?

If you have ever gone backpacking for any length of time, you will have met large numbers of people all over the developing world from Europe, Australia and America who are living there and working illegally. In general the result of being caught is being asked to leave and come back with a new visa, and not being violently arrested and thrown into a concentration camp indefinitely.