The answer for many agnostics and atheists is that it is because the universe is meaningless. But, this answer, apart from being not very satisfactory, also tacitly assumes that this is the only legitimate answer.
Theists generally don't answer this question. What they will usually say is that the universe is meaningful and that it only appears senseless at times because we don't see the big picture (eg., "there's a reason for everything"). That might be so, but it still doesn't answer the question on why there is a universe and why that universe is shrouded with an apparent sense of meaningless in so many of its features.
For example, when we probe deep into the cosmos, there's no visible signs that say "Welcome!". There's no message in pi, at least one which we can decipher. Rather, the universe looks, well, meaningless from a certain perspective.
So, the question is why? If its not because the universe is meaningless, then why would God go through all the effort to make it look meaningless? Why not just make the universe look meaningful (e.g., patterns of stars that can be read in English as saying "Hi, this message is from God and I just want you to know that I'm here..."). Such a sign would instantly convey a fully meaningful universe, and the debate over this issue would end right there.
In order to postulate such an theistic answer, why not treat the apparent meaningless in the universe as a requirement to creation, such as:
1) There must be a universe (or God wants there to be a universe)
2) This universe must appear meaningless to any beings who seek an underlying purpose
If we treat (2) as necessary, then it eliminates a whole bunch of possibilities (eg, the universe appears meaningless because we have the wrong interpretation of what we see, God has a different view of meaning than us, God had trouble creating a meaningful universe, etc). And, in addition, it focuses on finding a reason for meaningless that might be God's will.
So, let's look at the possible reasons why (2) is correct in a theistic account:
a) The universe must appear meaningless because this allows intelligent creatures to pursue the full potential of their free will.
b) Apparent meaninglessness is a perfect universe. God only creates perfect universes.
c) Some other universes God makes are apparently meaningful, some others not so. We live in one of the 'not so' universes.
d) Meaninglessness and meaningfulness are yin and yang, can't have one without the other.
e) Meaninglessness is chaos, and chaos is the engine of creation because that's just how things happen to be.
f) Meaninglessness is an unsolved paradox of reality that must necessarily be included in any creation if that creation is to reflect reality.
h) Meaninglessness is actually randomness, and randomness is a mathematical necessity which must be included as part of the formula of anything real.
i) Meaning without meaninglessness has no meaning.
j) Meaninglessness that becomes meaningfulness is the most meaningful of a universe.
I'm sure there are many other possibilities on why an apparent meaninglessness in the universe happens to be required, but the one that I like the most is (j). In (j) there is a sense that apparent meaninglessness is a subset of meaning, and that as a subset of meaning it continues to elevate meaning to higher and higher levels. For example, if the universe is ever to be a fully meaningful place, then apparent meaninglessness must exist to a certain degree, otherwise there would be less meaning in the universe.
The (j) concept might seem to be closely related to the least action principle (minimum principle). The minimum path - the one requiring the least action or least time - is the sum of all the paths minus the ones that cancel themselves out quite naturally. The minimum path is the most apparent meaningless because it is the most ordinary. It is the one that is easily missed because it is the one which lies in the 'middle'. It is the small child of a big family (e.g., King David being the smallest of his brothers and considered to small to be king), or the insignificant child born in a stable of a poor family (e.g., Jesus being born in a stable), or the insignificant man hung on a cross (e.g., Jesus crucified). What these examples show is that apparent meaninglessness is considered meaningless because it seems to ordinary to be considered meaningful. We ignore the stone rejected as the key cornerstone as Psalms and Isaiah (I believe) said because it looks too ordinary - too minimum. Yet, it is the rejected path that is the most meaningful path.
Which gets back to (j). (J) is what I suggest that actually makes meaning possible. Meaning, I think, is born from un-meaning, and it extends into a great and diverse kingdom.
"The kingdom of heaven is like a mustard seed, which a man took and planted in his field. Though it is the smallest of all your seeds, yet when it grows, it is the largest of garden plants and becomes a tree, so that the birds of the air come and perch in its branches." Matt. 13:31-32