Just because slavery ended did not mean segregation, prejudice, and hate did. Many people did not like that they were granted these rights and segregated them, based on the "separate but equal" principle. The South is famous for its Jim Crow laws that segregated black Americans, but segregation existed everywhere. Groups such as the kkk formed, etc.
He did this to put an end to slavery.
Limiting the number of German soldiers and ships,
dividing Germany into a number of smaller countries,
prohibiting Germany from having submarines or an air force,
preventing Germany from gaining weapons and war materials