The story
Originates from the content rating for media entertainment in which "PG" stands for "parental guidance". There are several countries with a rating called "PG-13". The rating generally requires restrictions on profanity and depictions of adult topics like sexuality and violence.
Etymology from Wiktionary, CC BY-SA 4.0.