It's not against the law to be a bad person. In fact, there's a famous quote from H.L. Mencken that "The trouble with fighting for human freedom is that one spends most of one's time defending scoundrels."
The legal question is whether or not you can be required to create, perform, or publish something against your will. So in that narrow sense, yes the two cases are isomorphic.
If you start trying to create a legal framework that grants rights based on who's a good person and who isn't, well... Then you have a long road in front of you, and as they say, it's "paved with good intentions."