If his business does not cross state lines the feds have absolutely no say. The fed has the power to regulate interstate commerce. If it lies strictly within a state the fed should butt out.
I think it can reach the federal system on the basis of first amendment violation required by the state.
He doesn’t make that kind of cake. They are forcing him not only to make that kind of cake, but to express things he doesn’t wish to express on the surface of that cake.
I’m sure he would have been fine with just baking a wedding cake that he normally makes and letting them walk out with it and change the top decoration and add any lettering.