Young Sheldon season 5 answers a lingering question about Sheldon's (Jim Parsons) first roommate in The Big Bang Theory. Before Leonard (Johnny Galecki) moved into Apartment 4A, the socially inept genius was rooming with a different person named Sebastian (Steven Yeun). Not much is known regarding their setup, but a key detail of their history is explained in Young Sheldon season 5, episode 4 titled "Pish Posh and a Secret Back Room."
After Georgie (Montana Jordan) decides that it's best to drop out of school and start working full time, he agrees on a new living setup at home. Since he will start earning money, he has to pay rent and utilities. He also has to move out of his childhood bedroom, freeing the space and resulting in Missy (Raegan Revord) transferring to it. This leaves Sheldon (Iain Armitage) in their old bedroom. This should be a win-win for everyone involved: Georgie finally gets to do what he wants, Missy gets the private room she has long wanted, while Sheldon is able to move all his toy trains and science equipment into his own room. However, as seen in the Young Sheldon episode, this all turned out not to be the case.
Both Georgie and Missy were thrilled with the new setup, but Sheldon wasn't. Even when he had moved all of his things in his room, he remained unhappy and miserable. It didn't really make sense since having the space to himself allowed him to decorate it however he wanted. It actually proves that despite his frosty and indifferent demeanor, he craves human contact. After he got over his pride, he started admitting that he's not particularly thrilled with his twin moving out. To help him get used to their new sleeping arrangements, he would occasionally knock on Missy's door and sleep in her room. After a while, they decided to get walkie-talkies, so he could talk to her at night when he gets lonely. This explains why he didn't kick out his first roommate in The Big Bang Theory. Their relationship got so difficult and complex that Sebastian was compelled to wish death on Sheldon. Considering the fact that it was the genius who was subletting the apartment, it's interesting that he just didn't force him out, if they were having a lot of problems.
Very little is known about Sheldon's agreement with Sebastian, but it's safe to say that it wasn't that different from the setup he had with Leonard. That means that they're supposedly bonded by the exhaustively long Roommate Agreement. To Leonard's credit, he was extremely patient with Sheldon's antics. He also didn't want to move since it's a great apartment with decent rent prices. Most importantly, relocating would've meant getting separated from Penny. After she moved across the hall in The Big Bang Theory pilot, Leonard fell head over heels for Penny. He was convinced that they were meant for each other. Despite Sheldon's complaining about Leonard's wayward ways, Howard (Simon Helberg) and Raj's regular visitation, and Penny's continued ransacking of their fridge, he was secretly happy to be surrounded by people. He realized early on that all of his toys and science equipment wouldn't really make him happy - not without friends.
In hindsight, Sheldon never really kicked out anyone from the apartment in The Big Bang Theory. He liked to cite the Roommate Agreement when he would fight with Leonard, but he never suggested that breaking it would mean that his best friend would have to move out. Sheldon also never stopped people from coming over to the apartment even though he liked to claim that he's anti-social. It all comes back to the valuable lesson he learned in Young Sheldon after Missy got her own room.