I learned this one the hard way myself. The change wasn't motivated by any grief or frustration, I was simply looking for career growth since my role wasn't offering me any new opportunities. Instead of what I thought would happen, my boss identifying I could offer the company more in that new role, he was offended I'd ask to change teams and retaliated. I ultimately left the organization soon after because he had made it an absolute nightmare.
> HR is not your friend. HR is not there to protect you and your career. HR is there to protect the company AGAINST you.
This was very shocking to me to realize early on in my career, I'd always heard that HR was on my team. I quickly learned that they're just there to keep the assembly line happy and functioning.