It's often far cheaper to fire someone immediately and pay out full benefits than it is to keep someone on payroll on a PIP. The cost of keeping someone on PIP isn't just salary, it's also the management and maintenance associated with it and the opportunity cost of having someone working on a project that could otherwise go to someone more productive.
I think people have a huge misunderstanding about what a wrongful termination is. Unless you're part of a union or work in the state of Montana, which most software developers do not, then you can be fired for any reason or no reason at all as long as it doesn't violate your civil rights or some kind of public policy exemption.