They're legal because the government has not decided to make them illegal. If the government decides that your lemonade stand is a danger to public health, or that your stamp collection is a national patrimony and cannot leave the country, it will make new laws that enforce those decisions.