This sub occasionally touches on this topic in ancillary ways, but I don't know if I've seen a post that comprehensively tackles how Karen's bosses at Dunder Mifflin treated her. It seems that despite being a smart, hard working employee, her bosses never gave Karen the respect she deserved.
She appears to be the best salesperson at Stamford prior to season three, but given the posting online, was never considered for promotion. In fact, Jim shows up from Scranton and takes the "Number Two" job. Jim is obviously also a capable employee, but he came from a branch that was ranked fourth of the five branches Jan over saw. Furthermore, Jim was not even the best salesman in Scranton.
This begs the question why Karen was never considered for that position at her own branch. It seems that Josh didn't always think much of her. When she makes an innocent mistake and forgets to compile a simple list, Josh assigns Jim to oversee her to ensure the task gets completed. That command borders on infantilizing a grown woman, who otherwise has shown no major deficiencies in the work place. When Josh leaves Karen the company card for dinner orders during the Diwali episode, he doesn't speak to her in a friendly tone. Instead, he sharply reminds Karen to keep the orders under $20 per person.
When she transfers to Scranton, she remains in the same position of being a smart salesperson working under the same "Number Two," only now her new manager Michael has an entrenched assistant to the regional manager in Dwight. Michael doesn't seem to have any personal animus towards Karen. He just doesn't particularly care about rank and titles other than his own. But as a result of her boss's attitude and the power structure where she landed, Karen never gets any opportunities to lead during her brief time in Pennsylvania with the one major exception of an interview for the corporate job.
This sub has dissected Karen's odds of getting the corporate job ad nauseam. I personally think there's not enough information to know how her interview went. I agree with the sentiment that the job was meant for Jim and that Ryan's MBA held a lot of weight. I do however think that if Josh had respected her enough to give her the number two job in Stamford, she might have had a better shot at the corporate job.
Of course, she eventually goes on to become a branch manager at Utica. I don't remember if that promotion happened directly after leaving Scranton, or if she made a lateral move and then moved up to branch manager. It only takes ten episodes between her leaving and her promotion. Given the quick turnaround, she might have impressed David Wallace enough at her interview to earn the branch manager job. However, given the financial instability Dunder Mifflin was facing, a lateral move and quick promotion is certainly possible. Regardless, despite never being considered as "Number Two" material by her boss at Stamford, she thrives at Utica.
So there you have it. Karen is the classic underappreciated worker who eventually climbs the ladder despite and not because of the people managing her. It's a shame she doesn't get rewarded more quickly, but it's an accurate portrayal of a large swath of people in the work environment. Feel free to comment with your own thoughts. I always love hearing what users on this sub think when I post here.