One of the most common misunderstandings about the Civil Rights Act of 1964 is that it was designed primarily to keep private businesses from discriminating against minorities. In reality, most of the Civil Rights Act was designed to stop official government discrimination in the form of Jim Crow Laws. These laws were set up by local governments, and businesses had to comply with these discriminatory laws, whether they wanted to discriminate by race or not.
As John Stossel points out, racial discrimination was largely a function of government, not private individuals who owned businesses. Private companies were usually 'ahead of their time' when they refused to discriminate against minorities, that is, until government forced them to.