Sometimes I use music as a way of concentration, especially when a lot of people are around me and talking, and I have to concentrate. It somehow helps me concentrate.
Music also helps me loose up and change my mood. A good, upbeat and joyfull song can turn any cloudy day into a happy/good day.
I personally don’t have music in my ears when I work out, I only “listen” to the music which is being played in the gym.
But when attending, e.g. spinning classes I think the loud music with a lot of BPM helps, although I can also push myself without music.