This knowledge of musical styles is typically learned from years of experience listening to and mixing sound in live contexts.
Acquiring knowledge of various music genres usually happens over time, as a result of years of actively engaging with sound in real-world performance environments.