is it okay for the state to tell someone who they must do business with?
An excellent question. Like most things, our principles behind this are confused and it mostly boils down to supporting laws that force your particular belief. For example, a gay bookshop is unlikely to hire a Christian who believes homosexuality to be immoral, even if they were the best applicant for the job and could perform the role without bringing in their personal beliefs. This would be considered perfectly reasonable by most pro-gay people, but perhaps not in the opposite situation of a Christian bookshop refusing to hire gay staff (which of course most anti-gay Christians would find perfectly reasonable).
Reversing it all, customers are allowed to boycott businesses because they don't like their stance on an issue (or even the owner's stance, businesses rarely need to have a stance on hot polticial issues). Perhaps this hypocrisy in anti-discrimination laws is a recognition that businesses usually hold the power, or perhaps it's just simple social engineering.
To counter all this, you could say it is about professionalism - business is about cold, hard money, so you cannot refuse to do business with someone for reasons other than business success. The laws do not seem to consistently reflect this principle however.