There's no way TMP was going to appeal to young kids. I was 9 when it came out and the cerebral plot was pushing it for me.
I don't mean all
young kids. But Paramount's and Roddenberry's feedback from the conventions of the 70s was that whole families watched "Star Trek" together over a decade of early prime time repeats. It was essential that those fans would be able to attend a theatrical version.
Sure, lots of kids attended and were bored to death
(same with many of their parents) but had they been excluded due to the film's rating, the negative publicity may have been disastrous.
Check out the tie-ins for ST:TMP: the first Mcdonald's "Happy Meals" themed boxes, plastic mugs and cereal bowls, kids' pajamas, plastic colouring cloths for the party table, water pistol TMP phasers, etc.