They have this in Saudi Arabia, police put up checkpoints and stop all traffic and ask for your residence ID card or visa in passport. If you don't have it, you get deported.

I guess that they are trying to catch people coming in illegally from the south?
This sort of thing is normal in lots of countries, either to catch people without license or those with unregistered vehicles.