The white Southerns believed that a separate code of laws applying to black people was necessary because they wanted to restrict freedom of African Americans. They wanted to control the freedom of former slaves and their decendents.
Southerns believed that creating a separate code would help mantain peace but it only brought more problems and justified generalized anger.