its public decency laws that say clams and sausages need to be made indecipherable. however, until our friends the north american eagles started complaining, there was a loophole in japanese law that didnt recognize kids as sexual - and that contributed to the popularity of loli hentai. one doujin i saw went so far showing a close up of a flat chested girl's virgin vulva until someone stuck it in, after which she was censored.
of course, laws are moot when you dont sell it, but since most artists want to make a profit off their art, for example at comic market (comi-ket), they have to censor. that is doubly so since the gallery hosters where they put their stuff up are required to follow the laws, too.