I suspect they often do the PIP as legal protection, documentation they can produce later if needed. Even in an "at-will" environment, employees can sue for wrongful termination.
I think this is broadly the case. A few companies might be genuinely invested in improving performance with such a plan but for the majority it's a way of managing someone out. Over the years I've seen over 30 devs put on PiPs. 1 survived.