Near the end of the 18th century, other European nations began to enact age of consent laws. The broad context for that change was the emergence of an Enlightenment concept of childhood focused on development and growth. This notion cast children as more distinct in nature from adults than previously imagined, and as particularly vulnerable to harm in the years around puberty. The French Napoleonic code provided the legal context in 1791 when it established an age of consent of 11 years. The age of consent, which applied to boys as well as girls, was increased to 13 years in 1863.
Like France, many other countries, increased the age of consent to 13 in the 19th century. Nations, such as Portugal, Spain, Denmark and the Swiss cantons, that adopted or mirrored the Napoleonic code likewise initially set the age of consent at 10-12 years and then raised it to between 13 and 16 years in the second half of the 19th century. In 1875, England raised the age to 13 years; an act of sexual intercourse with a girl younger than 13 was a felony.
In the U.S., each state determined its own criminal law and age of consent ranged from 10 to 12 years of age. U.S. laws did not change in the wake of England's shift. Nor did Anglo-American law apply to boys.
Children and Youth in History | Age of Consent Laws
We have not had laws raising the age of consent from 10 or 12 all that long. We are not in the position to cast stones.