actually that is exactly what the government did. The bakery didn't refuse to serve homosexuals. They did refused to bake a cake with say, two males at the top (paraphrasing the case).
EDIT: looked it up, they didn't want to bake a cake with bert & ernie and a pro-gay-marriage slogan.