Laws do not suddenly materialize out of nowhere Brian. Government always and only works against the interests of people in practice. In the case of segregation government worked against the interests of the business owners as well as consumers, regardless of skin color. The fact that a business owner did not have the financial or political power to face down military might controlled by the government hardly gives justification for blaming him for the actions of those controlling that military and political might. Any law that is passed is done so with the approval of only a minority.
Most people disagree with most laws ijn some fashion.
Time and again in surveys across this nation we find that people would willingly give up the freedom of speech, that being the freedom of speech of others that they do not like of course. We are very quick to restrict the freedom of others and others of our own, which is why legislators have such an easy time taking more of our freedom on a daily basis. So laws that controlled casual interaction between individuals based on skin color were passed by a few in power and supported by a few from the general populace. Same as we have today. The only difference is in who holds the strings of power.