But there are all kids of laws that are actual infringements on rights even though they are presented as granting rights. And that is the point, rights are not and cannot be granted by the government or through law, what the government can do is bestow a privilege and that is what things like that are.
Now you can make perfectly rational arguments in favor of those privileges being granted, but that doesn’t change what they actually are and that’s the point.