Crooks is the only person of color on the ranch. He is the black stable hand and Candy's description, in chapter 2, tells us about the inherent racism against him.
"Sure. Ya see the stable buck's a nigger."
"Nigger, huh?" "Yeah. Nice fella too. Got a crooked back where a horse kicked him. The boss gives him hell when he's mad. But the stable buck don't give a damn about that. He reads a lot. Got books in his room."
This was simply the context of the times. Racism was alive and well, even in California. Steinbeck was about realism rather than idealism. This is the America that blacks had to live in.