Crooks' bunk is in the harness room, separate from the bunks of the other men. He is segregated because he is black. This segregation manifests in other ways. Since he feels ostracized, Crooks has developed a justifiably indignant demeanor. If he can not share the same space and activities as the other men, he feels more inclined to be guarded and protective of his own space:
This room was swept and fairly neat, for Crooks was a proud, aloof man. He kept his distance and demanded that other people keep theirs.
Given Crooks' perspective on the white/black issue, it is not surprising that when Lennie comes to visit, Crooks wants him to leave immediately. Crooks has no idea that Lennie is simple, honest, and in no way interested in the black/white issue. He simply wants to see a puppy. Lennie asks why Crooks isn't wanted by the other men. Crooks responds:
’Cause I’m black. They play cards in there, but I can’t play because I’m black. They say I stink. Well, I tell you, you all of you stink to me.
Despite Crooks' aloof demeanor, Lennie's smile wins Crooks over and he invites Lennie to sit. Crooks toys with Lennie, suggesting the possibility that George might leave him. This seems vindictive but Crooks is actually trying to get Lennie (or just someone) to understand what it is like to be black, segregated, and alone in a different sense. Crooks lets up when Lennie gets scared and is nicer towards him. When Candy joins them, they all find a common hope in the farm, but Curley's wife disrupts this camaraderie when she joins the conversation.