I am no legal or political theorist, but here is a fun little puzzle, not unlikely old hat to everybody who knows anything about these things.
Suppose you want to gamble (as far as I know a morally permissible activity within due limits—if you disagree, substitute something else, like scratching one's back in public), and I (say, as a legislator) enact a law prohibiting you from gambling, without any good reason behind it except a gut feeling that gambling is a bit icky. It seems plausible that I have acted wrongly. I should not prohibit you from an activity because I have a gut feeling that it is a bit icky. But why have I acted wrongly?
An obvious thing to say is that I have take away some of your autonomy or freedom. But what autonomy or freedom have I taken away? (I will use the terms somewhat interchangeably, but the issues may be subtly different in the two cases.) Intuitively, I have taken away your freedom to choose whether to gamble or not, or else the freedom to choose to gamble. But not quite. For you can still gamble even if gambling is illegal. So it seems that what I've taken away is your freedom to choose whether to legally gamble or not, or else the freedom to gamble legally.
Indeed, you no longer have these freedoms, since it is now impossible for you to gamble legally (assuming you have no ability to legalize gambling). So you've lost a freedom. But you've also gained a freedom. For now you are free to choose whether to gamble illegally or not, and free to choose to gamble illegally. You've lost your autonomy vis-à-vis the decision whether to gamble legally, but you've gained autonomy vis-à-vis the decision whether to gamble illegally. You lose one and you gain one. So it seems that you are not the loser in respect of autonomy, and hence you can't complain.
But, perhaps, you will say that now if you gamble, you are liable to be punished by law, or at least by your conscience (if you think you should obey the law). Yes—now you have a new freedom, to choose to gamble and be punished or not to do either. You've lost the freedom to gamble without punishment, and have gained the freedom to gamble and be punished.
Perhaps, though, the problem is that without a sufficiently good reason (and "feels a bit icky" is not a good reason), I have no right to deprive you of a freedom even if you get a new freedom in exchange. When we talk of autonomy, we should not be consequentialists who simply try to maximize the sum total of human autonomy. Just as it is wrong to kill one innocent person while saving another, so, too, it is wrong for me without sufficient reason to deprive you of one freedom even while giving you another. But while there is much to this lesson, I am not sure this is the right lesson to draw from the story. For consider the opposite case. Suppose that gambling is illegal. I now completely legalize it. By doing so, I take away the autonomy of your choice whether to engage in illegal gambling. So I've taken away one of your freedoms, and given you another in exchange. It looks now like legalizing and illegalizing have the same kind of effect on total freedom—each takes one freedom away and gives another. If I say that it is wrong with insufficient reason to take away a freedom even if I give you another, then in a situation where gambling is illegal and nobody has any good considerations for or against gambling, I should keep it illegal. But I am not sure that's right. Should one keep a restrictive law that has no rational justification? That doesn't seem right.
So it doesn't seem that considerations of autonomy are the right way to think about what goes wrong when one makes an activity illegal without sufficient reason. Is there a better way? I think so. To make something illegal is for the state to exercise a certain authority. To make something legal is for the state to cease to exercise a certain authority. As long as the state holds people to a rule, the state is exercising authority in respect of that rule. To release people from that rule is not to exercise an authority, but to cease to exercise that authority. Hence there is an asymmetry in making something legal versus making it illegal: to make something legal is for the state to cease to act in a certain way, while to make something illegal is for the state to begin to act in a certain way. If so, then we would expect an asymmetry in justification—actions in general require stronger justification than non-actions—and hence it is easier to justify the state's making something previously illegal be legal than the other way around. Of course this asymmetry is an anti-consequentialist one—it is an asymmetry similar to that between contraception and abstinence, or between killing and not preventing death.