If you're interested in a more theoretical (and less bourgeoisie oriented) discussion of the tensions between a social contract justification for punishment and our practical inability to leave the state, I would recommend "Legal Obligation and the Duty of Fair Play" as well as "A Theory of Justice", both by John Rawls, as well as "The Principle of Fair Play" by A. John Simmons. You may know the second as a standard component of any introductory political philosophy curriculum, and the first and third were parts of a philosophy of law class I took, taken from a textbook by Frederick Schauer. They are quite interesting.
The conclusion I have come to is that we are morally bound by the laws of a state in proportion to the degree that they benefit us in comparison to other possible bodies of law. This approximates our willingness to agree to a given scheme of rules if we were presented with free migration between all possible states, and the extent to which we would prefer the state we are actually in, we should be considered to have willingly agreed to their laws even if that did not happen in reality.