Someone once said that we spend half of our lives trying to assign a meaning to life, and the other half desperately trying to forget that we have done that.
Otherwise I can somewhat resonate with what Anxious Minds said...That, from this human perspective this is a question impossible to answer. And I feel that a perspective that's outside of our mortal box would render this question obsolete. There are some who claim that you can get into that outside perspective even while in this human shape, where there is the realisation that indeed there is no reason or meaning in life and that we are not separate from life and paradoxically letting go of all the attachment to meaning makes life feel meaningful and full of beauty.
Others say that even this above is just an experience of the personal perspective and that we can never know anything and searching for reason is inevitable even if you know there is no reason.
But most of us somehow seem to be always searching for some meaning and I think that's a beautiful part of being human