People who see it as humiliating are misunderstanding the dynamics. Precisely because software engineers have so much market power, it's not so simple to kick them out; a company that developed a reputation for outright firing people would have serious recruiting issues. If a manager at Google, Facebook, etc. decides that one of their reports isn't doing a good job and has got to go, the process is generally to laboriously help them realize over the next few months that they've chosen to leave and are excited to explore new opportunities.
It would seem to me that a company who fired subpar performers would have a better reputation than a company that makes record profits and then lays off a few thousand engineers a quarter, and yet...
Companies in this category generally give multiple months of severance pay for the same reputational reasons. Cold comfort, of course, to the specific developers who got laid off and would rather have the job. But it effectively signals to the next crop of hires that the company is genuinely committed to their compensation packages.