The exception is often called a Romeo and Juliet exception colloquially when applied to statutory rape laws. See, e.g. here. It is an exception to the age of capacity to consent to sexual conduct, not an exception to the capacity to consent to a contract.
When children are very young (typically in the range of 7 to 12 as set by statute of common law, it is 6 ...
What is the principle that children can consent to other children of the same age, but not to an adult, called?
There isn't one, per se. A child can enter into a contract with an adult - for example by buying sweets, getting a bus ticket, or having a part-time job.
Two three year old children that agree on "playing doctor" and ...
The Family Law Act 1975 (Cth)
Specifically ss69P-69T create the following presumptions about paternity:
married to the mother
cohabitation with the mother
registered as the father
by finding of the court
These presumptions are rebuttable under the procedures spelled out in the subsequent sections.
In your first example this is a result of what's known as "Age of Criminal Liability" which is the minimum age one must be in order for the person to be held criminally liable for breeches of law (It depends on the jurisdiction in question, but typically 11 years old is the extreme high of the age while 7 is often the low end of the range.). Two ...