For a number of reasons, I don't think your example works as a critique of this issue.

Same sex marriage isn't a crime; the message on the cake for someone convicted of a sexual offence (which is crime) likely has nothing to do with his arrest record; it's hard to image a "sinful" or criminal message on a cake for a hetero couple; speculation about what Baker Phillips knows about his client's lives is just that, speculation, and is neither here nor there to the question of whether he has the right to do his job without the State telling him he has no rights but what they give him -- and that all his religious scruples had better be kept secret, unless he wants them to shut down his business.