Anime ( and Manga ) have never really been entrely for “Kids”. They were and are targeted, for the most part, at Teen & Young Adult audiences. Which means that mature subjects are not off limits.
Never mind that those groups, as well as younger & older people, now have access to the InterNet and the InterNet will give you anything without regard to age.
And, of course, the Creators in Japan are now themselves largely children of the InterNet era. So, what might look a little risque to some doesn’t even register on those same Creators.
Again, Never mind the same factors here in the USA have caused me to abandon most commercial TV & Movies. I will put up with Trashy stuff if it is something I’m interested in. If I don’t have any real interest in it then I will just turn it off or put it down.