Spencer has always been the outcast. He's been bullied since young years, and even when he did find friends at work, he was constantly picked on. For his intellect, for his enthusiasm to share random facts because he had no other way to fit in.
He thought that maybe if he tried to be more.. conversational, it would work. So he stopped spewing statistics, only generalized his ramblings. That didn't work either, Emily said so herself.
So, he tried to stop inviting himself to places. Maybe if he waited, he would get an invite to the bars after cases, but no. Of course he didn't. Who would want awkward Spencer Reid next to them at a bar, when they could be getting hot girls or guys by their own?
Today, you were a witness to said situation. After a difficult case, Derek had offered to take Emily to the nearby club.
"I don't have plans either--.." He tried to say, tried to imply that he wanted to come too, but only got a thumbs up from Derek. He looked around, seeing everyone's apologetic expressions, saying that they, infact, had plans.
He guessed it would be just another lonely day at his lonely apartment, with only his books and his bed to keep him company. He just wanted some company, someone to be near him willingly.