Good quality dairy is associated with high insulin-like growth factor 1 (IGF-1) levels in blood, which in turn leads to rapid cell growth. This explains why e.g. Dutch people went from being the shortest to the tallest in Europe.
I always thought that was more of a conspiracy that milk helps you to grow. My mum always tried to get me with that but I always didn't give a damn because I thought it's not true anyway.
I'm not up to date on the science, but my dad was old - born in '43 - and worked as a teacher, so he could see several generations grow up. He was tall for his generation, but by the time I was a teenager, he was tiny even compared to his teenage students. I was a head taller than him even before he started "old man shrinking".
He always pointed at food, that the generations after him had access to better stuff and more milk. The shortest member of my family is my niece who is totally anti-milk, but that's just anecdata.
So it might be some other macro-factor influencing growth, with milk being the most glaringly visible item on the table. But it does kind of make an intuitive sense, and the dutch are freakishly tall while they have some of the best dairy products in the world
I suspect it's more about not being deficient in nutrients that milk (and especially the reinforced variety sold in many countries) happen to be rich in.
Meaningless anecdata, but as a child and teenager I absolutely loved milk (I was drinking 1 liter of it a day in my teen years). I grew to be 190 cm (around 6 ft 3 inches), whereas both of my parents are around 1 foot shorter.
I loved milk but it didn't counteract Italian genes, I'm 5 foot 6 which is fortunately normal in my country (Uruguay) but would be short-ish in the USA.