If there is one piece of advice that many dedicated employees wish they had taken on board at some point in their careers, it would be to be careful who you work hard for (and when you do it). Many a worker has put their heart and soul, or at the very least, many hours, into a project or goal for their job and then been rewarded with more thankless work or, even worse, have somebody else take the credit for what succeeds.
Few things squash enthusiasm for a role quicker than putting in the work and not getting any recognition for it, or watching another person take the praise. It doesn’t really make sense that it can be a common occurrence, but it is nonetheless. In some cases, there is nothing to be done about the issue, so it makes it extra sweet when the opportunity arises to teach somebody a lesson.