Charlie’s job loss is directly related to his increased intelligence after the surgery.
On the surface, Charlie’s increased intelligence made him a better worker. He took on new responsibilities, like operating the dough mixer, and even found a way to increase productivity at the bakery. At first, these new talents earned him a raise. However, when Charlie found out that his coworker Gimpy was embezzling money, his decision to confront Gimpy resulted in tension leading to his termination. This confrontation was the final straw, as the bakery employees realized they could no longer exploit Charlie, but instead had to fear his new canny intelligence.
Before his surgery, Charlie’s coworkers loved him precisely because they could harass and taunt him without any repercussions. His coworkers, particularly Joe Carp and Frank Reilly, enjoyed setting up elaborate situations that resulted in Charlie’s humiliation. For example, they invited Charlie to a bar, persuaded him to drink too much alcohol, and then laughed as he embarrassed himself in front of the women on the dance floor. They then left him to find his own way home despite his extreme drunkenness. From this situation and others like it, I can infer that Charlie originally played an important role in the social life of the bakery.
By bearing the brunt of his coworkers’ jokes, Charlie was able to diffuse tension and made each coworker feel much better about his own intelligence and abilities. When Charlie’s intelligence increased, he became no longer willing to play this role, and instead of making his coworkers feel better about themselves, he intimidated them with his intellectual conversation and new abilities. It's important to note that Charlie didn't mean to injure his coworkers' pride or cause tension; in fact, he continued to wish his coworkers well and value their friendship even after his surgery. However, despite Charlie's best intentions, his new insight caused tension in the bakery and the employees banded together and pressured Donner, the bakery’s overall boss, to fire Charlie.