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.
Almost nothing in evolution happened sequentially. We almost certainly didn’t start creating music before our brains were equipped for it. Instead these things would’ve evolved in tandem. Each one driving the other, in a virtuous cycle.