There are a lot of possible allusions listed in other answers.
However, one thing not mentioned is that the practice has a German name, upsheren, and furthermore that:
The Pennsylvania German superstition prescribes a wait of a year before the first haircut, lest the infant lose its hair, be a weakling, or die young: EM Fogel, op. cit. (see note 24), 42, nos. 81-82; 43, no. 83
(From Conception, birth and infancy in ancient Rome and modern Italy, by Walton Brooks McDaniel.)
It is fairly easy for a superstitious practice adopted from the general culture to accumulate religious ex-post-facto rationalizations.
(Yes, I am aware that one year is different from three years. But superstitions change over time and manifest differently.)
Update: One extra point. See Moed Kata 14a:
(Shmuel): It is permitted to give a haircut to a baby born on Chol ha'Mo'ed, because it comes under "One who is released from imprisonment during Chol ha'Mo'ed" (1:a:2).
such that it is clear the Amoraim did not have upsherin. Rather, this was drawn from the surrounding German culture.