The Office is, by design, a very quirky show where the majority of characters on the show are "characters". I don't want to say most, but 60% of the regulars have strong personality quirks. The show is meant to be a satire on how crazy the people you work with are.
Michael Scott - A child in a man's body. He's lovable, but selfish, and he's completely 100% out of touch in a lot of ways. He's not aware enough to not crack sex jokes at a sexual harassment seminar, and he considers taking the entire office out to watch him and Dwight spar is a good use of company time. There's a little Michael Scott in all of us -- that's why the character works.
Dwight - crazy/bonkers/loony, but believable.
Kevin - really slow. "Want to see how many M&Ms I can fit in my mouth?"
Angela - crazy, anal, cat-lady, spiteful.
Phyllis - Pretty normal, brags about her rich husband a bit. Also fat. Fat isn't really a personality trait, but there's 3 really fat people on the show, which is a little unusual for prime-time TV.
Creed - psycho.
Meredith - alcoholic
Oscar - normal but gay (not that there's anything wrong with that)
Ryan (BJ Novak) - he's close to normal, a little bit of a superiority thing going, also, ends up a drug addict and in jail for fraud.
Mindy - Super clingy and nuts for shopping.
Andy Bernard - not sure how to describe him, but he's crazy too. Weird personality.
So, the only ones who come across as normal to me are Jim, Pam, Phyllis (close enough), Stanley (who's very fat), Darryl and Erin, and Erin strikes me as a little weird, but not enough to make the crazy grade.
That's 6 regulars who are what I might call normal and 9 regulars with distinct personality quirks.
So, the show leans towards personality quirks and Toby has a personality quirk too. He never has fun, he never smiles, his voice never shows any emotion. He's as interesting as dry toast and on top of that, he hits on Pam (weird and so not an HR thing to do). And when he hits on her, he comes across as even more boring and sad than usual. Toby's obviously not a major character, but like many of the personalities on the show, he's a flawed character. He's the way he is because the show is built around crazy and flawed personalities. The show is rather unique in that, all that flaw comes across as mostly funny and all the characters (possible exception being Creed) come across as believable. Parks and Recreation has the same model where the majority of the characters are, in some way, crazy, but still mostly believable. Though I think Parks and Rec sacrifices some reality in exchange for comedy, while The Office tries to keep all its characters believable.
But that's why Toby is the way he is, because having a personality flaw is a requirement for many of the characters on the show.
Now as to backstory, which could also be an interpretation of your question. The Office never got into backstory. We never learn why the characters are the way they are, except maybe Dwight who grew up on a farm with a crazy brother and presumably crazy parents. But for the most part the characters are just the way they are and for virtually all of them, there's no history or reason to say why they are the way they are.
Not sure that answers the question but I figured I'd give it a shot.