Yes, it is in fact a key feature of laws and statutes that they (sometimes) keep people from just doing whatever they want.