The idea's of a "right" is a complex thing...obviously we can't all be completely autonomous..if we were we'd be just like country's and so we should be fighting one another all the time. Obviously this isn't desirable so we give up some of our "rights" so as to protect other "rights. Meaning we'd rather have a better life over all as opposed to absolute liberty.
Also I'd like to note that there are two kinds of rights (liberties) which we are referring to..and they are very different.
Positive liberties: political liberties/ what you may exert on others/society
Negative Liberties: What people/society can't do against yourself.
Both are needed to allow us to pursue happiness and yet coexist with one another.