While it's important to prioritize putting what your team needs above your own personal desires, you sometimes have to be selfish in order to win. I mean, the game was already lost when your team decided to play with the comp they went with, failed to pull their weight, and overall followed the beat of their own brainwaves. At that point, if those players can't find the decency to switch and co-operate with the team, then why fill for them? You might as well take the opportunity to play something you've always wanted to improve on, or go with a hero you are more comfortable with.
It doesn't help that for the past 5-6 seasons of Competitive, it goes against the core mechanics of the game to stick with one or two heroes, yet competitive really does encourage maining one hero.
It's insane when you think about it!