As Keith realized there was much more to Joss than met the eye and that she probably wasn't as put-together as she appeared, he wondered if that was why they got along so well. There was a good chance they had both been rejected by everyone else their whole lives for being themselves until they met a kindred spirit.
She did say that thinking the best of each other might be why they worked. Had she figured out that he used humor as a defense mechanism? She probably had, considering her job. Maybe she felt a sense of solidarity around him too.
She also said he made things more fun. Based on what he had seen since she got hurt, he was beginning to understand why that was such a big deal to her.