Didn't they own their own bodies? If so, they also own the labor their bodies produce. That being the case, they may dispose of the product of said labor in any way they wish. If they decide to only sell to members of the Mormon Church, for example, isn't that their right?
If they had never advertised and sold anything to the general public, they could have operated as a "private, member only" bakery.
But the didn't, so they couldn't.