Here is the rundown of Japanese AOC laws;
- The Base AOC is 13, established in the Penal Code of 1907. The Child welfare act in 1947 then goes on to illegalise "obscenity" with those under the age of 18.
- Prefectures themselves created additional laws to criminalise "obscenities" committed to a child of certain ages, unless in a sincere relationship, aka parental permission. In Tokyo this is 16+ for girls, 18+ for boys, and 20+ for no permission required, creating de-facto higher ages of consent.
- In many cases where there is a majorly indecent relationship or large age gap, parental permission is often ignored and the relationship prosecuted by the state regardless.
The oddities of the law are related to the times, and that they weren't for socially condoning underage relations with with other children or elder persons, but to legally formalise cultural behaviours and provide some amount of protections - no persons can be married below the ages of consent, however many were married or betrothed from the age of 13 and up, while being within the remit and guardianship of their parent's household, with sexual interaction being forbidden ((The same was true of medieval to renaissance period marriages in European nobility and aristocracy, while common marriage had an average age of 22-25 for women).
The 1947 post-war act went on to further codify these cultural beliefs while recognising the need of legal protection in the face of lacking societal protections, in the shifting times and cultural attitudes.
It is also worth noting that the law has been changed and is changing as society moves forward; marriage laws were brought up to the earlier mentioned Tokyo standards, and reviews were made in 2018 to update both minimum marriage ages and age of consent to 18 for both men and women, as well as definitions, by 2022.