Music is just layered simple patterns and our brains LOVE IT.
Sound is pressure waves, musical notes are a specific pattern of pressure waves. Melodies are repeated musical notes. Songs are repeated melodies following standard structure.
Our brains love trying to decode and parse all these overlapping patterns.
Maybe not really a shower thought and more wild speculation.
This is a cool take! I don’t think I agree though. I assume we developed pattern recognition before music/language. Many animals have the ability to note attributes about plants and animals even without the ability to communicate complex ideas (ie language or oral tradition). I assume that type of pattern recognition was a good blueprint for functions like music and language, but my guess is it started from a general pattern recognition, then was retuned for music and language.
Again, pure speculation, but there is some logic behind it!