Why were the Civil Acts right and the Voting rights act passed?

racial and gender discrimination