> The phrasing "HR isn't there to protect you, it's there to protect the company" applies more here.
I agree (although had interpreted the statement originally differently). Unfortunately, the part about "XYZ isn't there to protect you" applies to so much in life. Even police don't have a responsibility to you protect you (but just the public as a whole). The lesson from stuff like this is often to make sure your best interest are aligned with the most powerful and active stakeholder in the "room".
Or don't engage with people whose interests are not aligned with yours. You can do an awful lot, and carve out a pretty good life for yourself, if the powerful people whose interests are not aligned with yours don't know that you exist. Considering that everybody else has an incentive to align with the most powerful and active stakeholder in the world, this is the only way to avoid a unipolar dictatorship.
Relating it back to the story at hand, the blogpost's author would've done well to just disengage from the coworker who didn't like him, and also to not report them to HR. What I had to tell my report when HR got involved: "The right thing to do here was nothing."