On the face of it, it would appear that these two men ordinarily wouldn't know each other, let alone be such close friends. Apart from their status as itinerant farm laborers, they don't appear to have much in common.
But the truth is that Lennie and George need each other. As Lennie has an intellectual disability, he's vulnerable to exploitation, and he would not be able to make his way in their world on his own. Not only that, but without someone like George around to guide him, he's liable to wind up getting into serious trouble. (He manages to do so even with George around, but that's another story).
As for George, he made Lennie's Aunt Clara a solemn promise that he would always take care of the big guy, and George is nothing if not a man of integrity. Besides, having someone as big and strong as Lennie accompany him on his travels can be useful. It's a hard life being an itinerant farm laborer, traveling around from place to place, bumping into all kinds of unsavory characters along the way, so it pays to have someone by your side with the necessary physical strength to deter anyone from trying to rob or attack you.