It's all a matter of compromise. As long as the argument exists of "adults can make their own mistakes", a very minor amount of hazardous chemicals and substances is reasonable from a legal perspective. If you ban this, you have to ban cigarettes... and alcohol. There are studies that have linked BREATHING to cancer.
However, I do think the harmful substances are too abundant, too overused, and not enough people are made aware of which ones are particularly harmful. A small warning label is enough for legal purposes, but realistically nobody can read every bit of text on every container of food they buy, especially with all the other legal text out there.
But realistically? They have to put that label on anything with even the smallest trace of a substance that has ever been linked to harmful side effects, or they could get sued. It's usually not actually harmful in any meaningful way, it's less about OUR protection and a lot more about protecting the people who make these products.