The second scenario you describe is genuinely worse than the first. It's bad for people to be undocumented, whether they're getting deported or not.
Yes, it is. But potentially the best outcome for someone who is an illegal immigrant - for the immigrant and the USA - is not necessarily to deport them. It might be to give them a means to continue staying instead.
I accept as a valid issue that this could potentially encourage more illegal immigration if the USA lets people stay. Although probably a lot less than you might think, because I suspect by far the biggest driver of immigration is how rubbish it is in the immigrant's country of origin. This is one of the arguments in favour of international aid.
In the condemnation of degenerate gamblers, you don't make an exception for the person who won the jackpot and congratulate their success.
Currently I think the opposite is how it works, and many people are fine with it.
Did a company manipulate monopolistic power to destroy competitors, did they "move fast and break things" where what was often broken was the law? Manipulate systems to hoover up huge sums of taxpayer funding, keep the profits and avoid taxes in return? Sure sure, maybe they got fined a few times because they couldn't lobby (bribe) the authorities, but at the end of the day the company is worth a trillion dollars, its sociopathic/narcissistic owner-CEO is one of the 100 richest men on the planet and lionised for his accomplishment. Whilst this is the top end, but millions of people are doing similar stuff like it on smaller scales.
Or take Trump. All his frauds, lying, cheating, lawbreaking... and this was so objectionable, you voted him president. He's the living proof the USA doesn't really have a problem with degenerates who hit the jackpot.
A ton of illegal immigrants - outside the illegality of their immigration itself - are more honest and ethical than Trump or many people lauded as national heroes.
Why is this capable, well-adjusted family not living their decent life in a nation where they are citizens? The US has done a disservice to that nation, that nations people, our own nation, our own nation's people, and likely even that happy family themselves by allowing people to live outside of the rights and obligations of a citizen.
Sure, if they should have the rights and obligations of a citizen, then offer the deserving a route to US citizenship, even if they were illegal. Hell, Trump has decided that foreigners can just buy residency if they've got a few million lying around, so don't pretend your country is actually that picky.
But otherwise, the argument that this is somehow unfair exploitation of foreign countries and their citizens by the USA are weak to absurd, because:
1) This argument is cynical to the point of dishonest. Very few people against immigration are motivated by benevolent concern towards immigrants or their country of origin. I don't believe you are, for instance.
1) The circumstances of their country of origin are such that many would be unable to thrive (in extreme cases, this is the rationale underlying asylum). Thus in those cases it's not depriving that country of anything at all, those people would just be wasted there.
2) It's completely broken to make arguments that it's unfair to deprive countries of capable and productive people when they are illegal immigrants, whilst at the same time your country intentionally tries to strip other countries of their brightest and best via work visas.