Any law is an attempt to control people regardless of what it is about.
There is attempting to keep people from violating the rights of others, such as prohibiting rape and murder, and there is attempting to control people for their own good. There is nothing incompatible between liberty and prohibiting people from violating the rights of others. The other, not so much.