I believe it is a holdover from the age of consent in Italy was at the time the Vatican became independent. The Vatican never bothered to change it.
Half-right. The Vatican age of consent was 12 from 1929-2013, in line with 1929 Italy's, then Pope Francis increased it to 18 in 2013 (no prizes for guessing why...):
From Wikipedia
https://en.wikipedia.org/wiki/Ages_of_consent_in_Europe#Vatican_City
Law No. VIII of 11 July 2013, entitled "Supplementary Laws on Criminal Law Matters" establishes the present law for the State of Vatican City regarding criminal penalties for sexual acts with minors. Article 4 of Law No. VIII defines "minor" for the purposes of that law to mean "every human being below the age of eighteen years." Article 8, paragraphs 1 through 4, establish criminal penalties for anyone who engages in sexual acts with a person below the age of 18. Paragraph 5 of Article 8 provides an exception to this by stating that "the offence does not exist if the sexual acts take place within a marriage."
[161] Canon 1083 of the
1983 Code of Canon Law states that "A man before he has completed his sixteenth year of age and a woman before she has completed her fourteenth year of age cannot enter into a valid marriage."
[162] Thus, in the context of this article, the age of consent in Vatican City may be considered 14 for married females who are having sexual relations with their husbands only, 16 for married males having relations with their wives only, but 18 for everyone else, whether married or not.
It should also be noted that the "Law of the Source of Law" of the Vatican State requires that any local laws must first defer to divine law, to Papal decrees, and to canon law. As the Vatican understands divine law, even if not sanctioned with criminal penalties by the state, all sex outside of marriage is illicit regardless of the age or willingness of those who engage in it.
When the Vatican City was first formed, it adopted the then-Italian age of consent of 12 as per the
Lateran Treaty of 1929. Until July 2013 it had the lowest age of consent in Europe, but after that month, when the Pope made his decree, it became the highest