The government was holding a sword over all artists heads with the rule/law being challenged. Even if it was not enforced often or at all, it is a weapon the government can use against anyone at any time. That is the problem with having so many laws. Most people break multiple laws per day and it is all discretionary if anyone is going to attempt to prosecute them.
As to the Supreme Court’s decision, the same ruling would apply in a converse case. What if a gay web site developer had been asked to create a Biblical web site?