That is the correct decision. The court decided against the procedures and decision making of the so called Civil Rights Case not on whether the state has the right to force the baker to make the cake.
At best, this case can be used as legal precedent and support for upcoming religious liberty and speech rights cases, as the narrow Hobby Lobby case did.
The left isn’t done attacking.
In at least one state with such prosecution, that state itself did not recognize same sex marriages at the time.