The fourth section of Of Mice and Men serves to connect several demographic elements (if we look at the book politically) and on a literary level this section serves to express the isolation of these marginal figures as well as their frustrations.
This is the only section where Crooks gets dialogue and he talks here about how isolated he is from the rest of the people on the ranch and how he has always been isolated. We see the effect this had had on him.
Crooks becomes proud and tempermental because that seems to be all that is left to him. Yet, Lennie wins him over rather quickly so we see that Crooks' demeanor is not "the real him" as much as it is a response to his circumstances.
When Curley's wife joins the two men in Crooks' room, we see that she too is trapped in her circumstances and that her "tart" behavior is a response to those circumstances. She is isolated too. And she is upset at being isolated.
Lennie, the migrant farm worker who has no other work opportunities, is part of this trio of discontented, isolated, powerless individuals, one rung lower on the social ladder than George, Slim and Curley. This is the only section where Lennie expresses his rage and threatens harm on someone else.
This section is about isolation, powerlessness, and the ways that a person's circumstances can shape his or her character (for the worse).