In most cases, the characters in the novel experience loneliness as a result of their circumstances. None-the-less, they've all be party to the decisions that landed them in those circumstances. Crooks by far has the least to say about his loneliness, as his isolation is imposed upon him by racial segregation. Candy is older than the other men and seldom welcome because of his age. Curley's wife married a man she didn't love and came to live on a ranch where there are no other women for company..... she made a choice.
Things are a bit different today. Residents of bunk houses are no longer a subject to racial segregation. Curley's wife may have had more opportunity to get out because of the many choices of transportation. Candy might find himself a nice place in a retirement community. None-the-less, historically, there have always been people who suffer from loneliness. Loneliness imposed by others..... and loneliness one imposes upon oneself.