Some workplace cliques are formed for valid reasons.
It is not a pleasant experience to feel left out in any kind of social situation, least of all a workplace where you spend forty hours a week. At its most serious, it can even get to a point where the company is liable for discrimination. The purposeful exclusion of a coworker is no joke.
That being said, there are many different reasons why a group of colleagues may not want to spend as much time as another. It isn’t necessarily going to be for nefarious reasons. In fact, some people are just so downright unpleasant to work with and be around that it is easy to forgive those who prefer to avoid them. It shouldn’t take that much effort to maintain a basic level of niceness.
It is undoubtedly awkward to have to work with somebody who isn’t likeable. Care has to be taken not to upset them, but that is a challenge for anyone who wants to spend as little time around them as possible. These kinds of individuals are not always willing to make a connection between their behavior and the way that others react to them.