It wasn't my manager who "brought HR in", though. Performance evaluation at my company isn't just the manager's discretion, and low performance will eventually get you a PIP.
Okay, fair enough. In that case, it may have been the case that your manager disagreed with HR's assessment and was willing to give you a second chance. In all of the cases I've heard of, however, HR has been brought in at the manager's request, when other, more informal mechanisms have failed.
I'm not even sure a manager here can fire you by his own choice, for what it's worth. The company invests a ton in its engineers; a failed investment is a big waste. Also, it's the manager's job to make his reports more productive, so that kind of failure reflects on him too.
Agreed, but if it's truly a bad fit, there comes a time when you have to stop throwing more money into a failed investment, to use your own terminology. It's up to the manager to decide if/when an engineer isn't a good fit for his or her team. Obviously, some managers are better about it than others, but hopefully senior management is looking at team turnover, and noticing that certain managers' teams tend to have higher turnover than others.
It wasn't my manager who "brought HR in", though. Performance evaluation at my company isn't just the manager's discretion, and low performance will eventually get you a PIP.