This comparison is better.
What we are talking about when we talk about compelled speech is merely about social etiquette and general consensus on the 'right way' to do things or to be polite.
Compelled speech comes from Authoritarianism. Authoritarianism is about being forced and there being this concept of punishment if you fail to comply. It's about fear of authority imposing itself on you.
Thus walking the dog and not saying hi, would still be a choice. You can choose to be a dick and be impolite and there aren't any real consequences to it. No one is going to report you to an authority or power and make you explain your actions. You are free to be a dick if you want to. It's just most people aren't.
Authoritarianism and compelled speech is more about power from above being used against you to punish you in some way. It's top down and hierarchical rather than by consensus. Liberalism is driven by social consensuses which we choice to participate in or stick two fingers up at and doesn't have this element of punishment in the same way.
Where there is an element of law, liberal laws tend to reflect the accepted and widely recognised consensus and you don't have to constantly 'prove' that something has popular support. It's just 'understood' as something almost invisible in our society. It's viewed universally as 'just'. They are logical.
Whereas as an illiberal law or authoritarian law is feared, doesn't have this state of invisibleness in society as it jars with our understanding of justice and doesn't have popular support. It will have to be constantly justified as having legitimacy as it doesn't have public consent. Punishments are also disproportionate to the level of the offense because there is often an element of making an example of someone and to create this fear. The consequences of none compliance are significantly higher. They are
If you walk the dog and don't say hi, you aren't in fear of the authorities tracking you down and arresting you with a possible 29 year sentence, because you (for examples sake) didn't fold the washing in the correct manner.