But we don't put barbed wire on random sidewalks and then blame parents if a kid walks over it and gets hurt. There is the attractive nuisance doctrine, among other things.
Kids need varying levels of guidance until their brains mature and they learn how to navigate the adult world, which is why we have the legal concept of adulthood, and age-restricted laws for things like drinking alcohol and voting. Kids are not tiny adults, they're adults-in-training.