Most examples boil down to common sense. Nobody is going to arrest a 14 year old for driving their dying parent to the hospital.
Similarly, it is reprehensible but legal to pull up a chair and watch a child drown in a pool.
There is a difference between law and morality, and humans will use the second to selectively enforce the former.
In which country? Even for the US I don't believe the law system is that crappy.
There's video from a few years back that shows very American cops standing outside a burning house at night, knowing there was a young child still in it. A passing pizza delivery dude[1] rescued the 6-year old, handed her to cop, and ended up requiring hospitalization. In the online discussion, everyone called the rescuer a hero, but I don't recall seeing a single condemnation of the cops (a "first-responder") who didn't enter the burning house.
edit: 1. the hero's name is Nick Bostic https://www.youtube.com/watch?v=sBlE52qKKuw
In my country you can't watch a kid drowning in a pool* but you are not obligated to help anyone in a burning house, since that would put you in danger too. I assume it is the same ~everywhere in the world, including the US.
* assume rescuing would be fairly safe, you are a good swimmer, you have lifeguard education, the weather is nice and the kid is small. AFAIK rescuing drowning people is dangerous as they can pull you down.