There are as many specific answers to this question as there are composers, each with his or her own life experiences and motivations. Somehow the urge to create music seems to be stronger in some people than others. (I cannot remember a time I was not making up music.)
The need for music has existed in all cultures and all times. From time immemorial mankind has expressed its yearnings, stories, feelings and what we call (for lack of a more precise term) the "human condition" by means of song, dance and instrumental playing. Music had a social function in the ancient caves, creating music to accompany the hunt so that the tribe could eat, celebrating victories, soothing the Gods. But what causes the hunger-to-create in an individual?
I believe one reason that people want to create music is simply because music is beautiful--it adorns life as well as expresses life. Another reason people want to create music lies in the nature of sound itself: Sound floats in the air, mimicking the spiritual realm; sound is enveloping and nurturing; sound is stirring; sound is able to penetrate past walls and barriers. Perhaps that is why music not only floats into our ears, it lodges itself in our hearts. Music has an intensity that seems to summarize and transcend ordinary life. Music is powerful in its ability to bring people together, to reach out to others from that secret lonely place we each have. Music expresses itself in time and seems to conquer the ravages of time. We hear a beautiful piece of music and it speaks to all generations.
And so it is that a composer feels a strong need to communicate feelings through the realm of sound and to express states of being and the passage of time via the living fabric we call "music". A composer feels a hunger to express in a universal way his or her unique "take" on the world.