Sure the governments job is to legislate morality.
I agree that legislation implies the imposition of public morality.
Why?
Ever hear of Natural Law? Its the fundamental basics for most laws and constitutions across the world. However, liberals dont subscribe to it and prefer Rousseau or Marx and not John Locke. Read John Locks Second Treatise of Government.
Heard of it, yeah. It never made much sense to me.
Let me ask you, what would you consider the purpose of government? You seem to think it's more than protecting our rights.