It was passed in order to prevent racist people from southern states from banning African-Americans from voting. They had things like literacy tests or vote taxes or similar things that would pose a problem for African-Americans of the time and all these types of laws became prohibited and were declared unconstitutional by the congress.