I've had to ask myself this question a lot recently.
I started playing guitar when I was around 13-14 years old, I wasn't that good but a couple years later my friend got a bass so every since we've always tried to start a band. Recently, I quit the band I was with to focus on getting my priorities straight and that was when I realized I didn't know why I even wanted to make music.
I had to comes to terms with that fact that probably the only reason I wanted to start a band as a kid was to be famous.
But as I got older, I realized that you can be the greatest musician in the world and never be famous If you don't have the networking skills or opportunity to do so. And me, as a typically anti-social person the idea of trying to make people pay attention to me and like my music sounded nauseating.
So I turned my focus to writing stuff that I can identify with. But the problem with that was that I thought the key to expressing yourself was to be unique, and you can only be so unique in this world, even with music, there's a limited number or words, notes or chords to play. So then I realized that it's nearly impossible to come up with something that hasn't been done before and this made me very depressed because I felt way below mediocre.
But i've come to find that ultimately the easiest way to be happy with the music I create is to tell myself that it's all just to pass the time.