Musical preferences tend to form in late adolescence and persist throughout adulthood. Music heard during childhood and adolescence creates more durable memories than music heard at other ages. The music we listen to during our early teens creates a strong sense of nostalgia in later years.
just the brain doing its thing
https://www.psychologytoday.com/us/blog/science-of-choice/202404/why-do-we-have-different-tastes-in-music
pretty certain its same reason why if you’re going to learn a language its best to start early