That's major problem in Mexico, such as government system isn't good and there's many fake cops in anywhere, that why about many Mexicans are got frustrated and end up to move in USA for better life, but illegal immigrants have many restricted to across and easier to felony on them, depends on area that where got it.
Mexico has deported many illegal immigrants into their countries like in central america and south america, also some are deporting in USA, long as they are US citizen and trying cross after Mexico.
For me, I believe that illegal immigrants in USA are require to obtain an ID or card to allow to stay in USA, also force them to pay taxes, even from paycheck and file for tax info. They are working on new system that can solve the issue instead of deport in other countries. If they got caught then they must obtain an ID or card then use that for job and across to other system, also they need pay the fine before can become US citizen after live in for 5 years or more.