A missing piece of the backstory of It's Always Sunny in Philadelphia has long been how the Gang ended up with Paddy's Pub. But a Season 15 episode finally solved that mystery. It also solved another mystery that fans weren't even wondering about: specifically, why Sweet Dee is the way she is. And in true It's Always Sunny in Philadelphia fashion, it all came down to an unexpected traumatic brain injury that has long been left untreated.

Deandra Reynolds' character can be summed up in a few words and most of them aren't pleasant. Without question, she has proven herself to be one of the most selfish, egotistical and unhinged people in Philadelphia, if not the entire country. Keeping in mind that she spends 90 percent of her time with Dennis, Charlie, Mac and Frank, that's saying a lot. They are truly terrible people, yet Sweet Dee is somehow even worse than they are.

RELATED: 3rd Rock from the Sun: Where Did Tommy Go in Season 6?

The most perplexing thing about Deandra is that her nickname "Sweet Dee" really doesn't seem to fit all that well. For many fans, the assumption has always been that it's ironic, like calling big guy Tiny. But it turns out that there was a time in Sweet Dee's life that she was actually a decent person that people enjoyed being around. Even stranger, the incident that changed her is related to how the Gang bought Paddy's Pub.

It's Always Sunny In Philadelphia - Dee.

In It's Always Sunny in Philadelphia Season 15, Episode 3, the Gang learned that their favorite roller rink was closing its doors. They wistfully remembered the good old days there in 1998 when Mac and Charlie were employees. Well, Charlie worked. Mac was just an aspiring drug dealer who wore way too much Charlotte Hornets gear. For their part, Dennis was getting ready to go to college and Sweet Dee was about to follow her dreams in Hollywood.

The wildest part about this whole situation was that Sweet Dee was delightful in every sense of the word. She was kind, considerate and didn't yell or swear at all. It was a little disconcerting. The events of that day led to a lot of big changes in the Gang's life, including Mac, Charlie and Dennis buying Paddy's Pub from the owner of the roller rink. That day also led to a drastic change in Sweet Dee's personality.

RELATED: The Office: Episode 1 Could Not Have Been More Awkward

At this point, Dee still had female friends outside of Artemis and kind of the Waitress. A final skate with Dee's 1998 crew before she headed out to California ended with her flying headfirst into a wall. This caused a traumatic brain injury that has likely never been treated by a doctor in any capacity. When she got to her feet, Sweet Dee had become the foul-mouthed disaster fans have come to know and love over the previous 14 seasons.

This injury changed the course of Sweet Dee's life. Her personality shift directly resulted in her failed acting career as well as driving off pretty much everyone in her life outside of the Gang. And they just treat her like crap. It's Always Sunny in Philadelphia wouldn't be what it has become without Sweet Dee being a truly horrifying human being. That's what made seeing her being legitimately nice such an awkward and off-putting experience.

It's Always Sunny in Philadelphia is available to stream on Hulu.

KEEP READING: It's Always Sunny's Best Fan Theory Explains Why Episodes Begin With Time & Day