This question derives from the outcome of my other one and what happened next. For all the details, please read the linked question.
After M joined back the company, they organized a party with myself, other managers, some top managers, HR managers/employees, members of the teams, etc. About 60 people joined and the party was paid with the company credit card of X (a card that the company never revoked, even when X was no more a company employee).
During the party I spoke with some HR managers (including the HR director) and M about this story and they claimed that they never believed X accusations and were pissed off by X not following company rules (an HR manager even wanted to suspend X).
But X somehow threatened the company and the HR department (new harassment accusation against HR), so they decided to fire M but with a very very very favorable agreement (which even contained a clause whereby the company undertook to hire M again, as soon as X left the company).
All details of the story were intentionally leaked by HR and the part of the agreement document was leaked by M following HR advice (who instructed M on which pages M should have shared). All the following actions have been taken to force X to resign (check that other team leaders did not add X, ask my manager to check that I did the same and took as many time as possible, moved X to another building, etc). I was thanked because, deciding not to decide, I played the HR game (without them having to intervene).
I was (and still am) very surprised by all of this.
I know that HR is supposed to protect a company and, in this case, getting rid of X was the correct action to pursue this goal, but: is such a level of Machiavellian machination a standard for HR? Can I do something to prevent them doing this against me in the future?