Troy Barnes (Donald Glover) and Abed Nadir's (Danny Pudi) friendship served as the heart and soul of Community, but that almost wasn't the case according to the show's original plan. The series was created by Dan Harmon (Rick and Morty) and ran for five seasons on NBC before moving to Yahoo Screen! for season 6, its final installment. The relationships among the core characters truly shaped the show, but in the early stages, Pierce Hawthorne (Chevy Chase), not Abed, was meant to have a "bromance" with Troy.
Troy and Abed were two members of the study group, the main characters in focus throughout Community's six-year run. They were students at Greendale Community College along with Jeff Winger (Joel McHale), Annie Edison (Alison Brie), Shirley Bennett (Yvette Nicole Brown), Britta Perry (Gillian Jacobs), and the previously mentioned Pierce. Early in the series, Troy and Abed formed a special bond and quickly became best friends. Abed's influence allowed Troy to come out of his shell as he finally embraced his nerdy side. The pair complemented each other greatly and their chemistry was palpable, both on and off the screen.
Even though Troy and Abed seemed like the perfect match as BFFs on the series, that was not the plan during season 1. When the series launched, there was an effort to pair Pierce and Troy as the goofy best buddies among the study group. This was evident in the first few episodes that featured many interactions between the characters played by Chase and Glover. According to an interview back in 2014 (via The Mary Sue), Harmon mentioned that Pierce and Troy were meant to be the "new Beavis and Butthead on the show." The fact that they both had a juvenile sense of humor gave them the potential for a unique friendship until it became obvious that Troy and Abed were the better pair.
While filming Community season 1, Harmon and the rest of the crew started to notice that Troy and Abed had something special. Offscreen, Glover and Pudi became instant friends and that relationship began to spill over with their characters. For that reason, more material was written that put them together in the series until that friendship finally blossomed. The credits scenes featuring Troy and Abed were actually filmed later on, but it helped solidify the dynamic of the pair early in the series. While Troy and Abed's friendship grew, it made sense for Pierce to be more of an outsider due to his age and controversial remarks, rather than being friendly with Troy.
Troy and Abed often got the study group involved in various shenanigans, and it was always clear that they were better together. That, however, didn't stop Pierce and Troy from having some kind of friendship during the comedy. Troy briefly lived with Pierce in his mansion before moving in with Abed. When Glover left during season 5, his character set off to sail around the world in order to receive Pierce's 14 million inheritance as stated in his will. Unfortunately, Glover's exit left a major void in Community. Not only did it affect the quality of the series, but it felt like something was missing for Abed with the loss of his second half. It's difficult to imagine a bromance with Pierce and Troy stirring up that kind of emotion had the series went in that direction.