Through the character of Lennie, Steinbeck makes a number of points about life and society.
Firstly, Steinbeck demonstrates society's ignorance toward those with a mental disability. At their last ranch, for example, Lennie was accused of rape after touching a girl's dress. It was not Lennie's intention to harm the girl in any way, he simply enjoys touching soft things. However, the people on the ranch were not prepared to accept Lennie's version of events, thus, prompting the men to flee.
Similarly, when Lennie accidentally kills Curley's wife, George must shoot him because he knows that Lennie will be lynched. Society, therefore, never gives Lennie the patience or understanding that he needs because of his mental disability.
Secondly, through Lennie's experiences, Steinbeck shows that only the strongest people could survive in the society of the Great Depression. Despite his physical strength, Lennie's innocence and dependence on George make him an easy target. Look at how he is treated by Curley, for example.
Ultimately, Lennie's death is symbolic of the idea that life is truly about the survival of the fittest. There is no place for those who need the support of others.
The best way to answer this question is to work backwards. At the end of the book, George had to take a gun and shoot his best friend in the head. George knew that the other men would not be kind. They would lynch him for an accident. This shows that Lennie does not belong in society. This society does not know what to do with someone like Lennie.
Before this awful event, Lennie did not fit in on the ranch. The men tolerated him, because of his strength and because George vouched for him. One man, Curley, started a fight with him and would have beat him (perhaps even to death), if he had the chance.
Before life on the ranch, Lennie and George had to run away, because the men they worked for thought Lennie attempted to rape a girl. This was not even close to the truth, but they did not take the time to find out what really happened.
All of this shows that the world in which George and Lennie lived was cruel. People only look out for their own interests, and there is very little compassion. It is a world that does not take the time to get to know people.