Bad cases make bad law. Nobody does — or should — know that better than the nine justices of the United States Supreme Court.

So it is not such a bad thing that in the case of Masterpiece Cakeshop v. Colorado Civil Rights Commission — aka the gay wedding cake case — the court endeavored not to make a law at all.

Anyone who thinks the case was decided in favor of those who want the law to protect discrimination against LGBT people stands to be sadly disappointed.

People of faith have been given a chance, if they are wise and open enough to take it, to reverse the growing disillusionment with religion by finding a way to accommodate respect for same-sex couples within their values. If they can’t, then no number of ambiguous or even supportive Supreme Court rulings will hold back the judgment of history and further weaken the influence of organized religion.

In order to build a substantial 7-2 majority, the ruling from Justice Anthony Kennedy went out of its way to stick to the narrowest question of the case. The decision focused on the very particular matter of whether the defendant in the case, the Colorado state body charged with finding and sanctioning illegal acts of discrimination, had entered into its deliberations with a suitably open mind.

Kennedy’s ruling was largely based on comments from members of the commission that seemed to prejudice the proceedings, entering into the case with a presupposition that certain religious beliefs and motivations were invalid.

The court was having none of that. The baker, Kennedy properly wrote, was entitled to have his case considered by an unbiased body that saw its role as weighing competing interests.

But the ruling was also clear that the right of same-sex couples to be held equal before the law was not to be compromised.

Legally, the loser in this case was not the baker, and not the same-sex couple refused service when they tried to order a custom wedding cake. The loser was an arm of government that, in the view of the court, had not observed proper due process in building its ruling.

The larger question of whether there is ever any valid reason — religious or otherwise — for a public accommodation to refuse service to any customer has been left to another day.

And, clearly, the day will soon come when culture, leading the law, will make it clear that businesses that hold themselves out to serve the public will be required to, indeed, serve the whole public. That is not hostility to religion. It is basic decency.

Just the other day, The Church of Jesus Christ of Latter-day Saints celebrated the 40th anniversary of the church’s decision not to discriminate against blacks in the offering of the priesthood and other religious rites and privileges.

Forty years hence, some of the statements heard this week from such public figures as Utah’s Sens. Orrin Hatch and Mike Lee, who seem to think the court ruled in favor of a right to discriminate, will, if they are remembered at all, be seen for the dead weight they are.