Your example is bad. These two things are clearly not the same. Porn (even in a small dose) for young children is almost universally accepted to cause long term psychological damage. Cola in a small dose is universally accepted to cause zero long tern harm. I think that if you gave your kid enough Cola to where it was universally accepted to cause major long term harm to them - CPS would come take that kid from you and you would likely be arrested for child endangerment (thus it is against the law).
Secondly the govt is not forcibly preventing you from uncensored internet. It is the ISPs, and not forcibly, all you have to do is acknowledge that you want it (this could hardly be considered forcible)
If a 4 year old kid drinks a bottle of soda, how will that affect them for the rest of their life? If a 4 year old kid watches a (simulated) hardcore porn rape scene, is that more likely to affect them negatively for the rest of his or her life?
How does that kid get at the soda? usually their parents or caretaker gives it to them right? Is that how they usually run across porn randomly on the web too? Maybe parents should watch kids every second they are online, but that is hardly possible with the ubiquity of internet devices today. At least if a kid sneaks a Cola at 2am whilst his parents are asleep - it is clearly missing the next day. Not so obvious if they were sneaking out and surfing the web incognito.