At some point, all living things die. Why does it have to be that way? Well, it depends on whether you’re asking that question scientifically or metaphysically. Let's take a look at why lifespans are limited from a scientific perspective and then derive some positive meanings that one could find in that fact from a "meaning of life, the universe, and everything" perspective.
The scientific explanation is straightforward: cells, and, therefore, the resulting organisms, are programmed to die for the good of related and future organisms. In cells, this process is known as apoptosis, which is an important self-destruct sequence to prevent cells from either degrading, becoming cancerous, or being invaded by a virus as they age. Additionally, cells have a certain number of divisions before they degrade past the point of being healthy (think making a copy of a copy of a copy of a piece of paper until the text on it becomes illegible). The same concept applies at the organism level, so your body slowly begins to function less effectively and eventually dies.
So we can’t live forever (barring some future cell-/organ-replacement therapy in the future, but then we’ll effectively run into the Ship of Theseus thought experiment but for humans), and the reason why that’s a good thing is that we would be a risk to the group as we degraded (i.e., you see this now with cancer, diabetes, and disease-susceptibility being common amongst the elderly—while we can put these people in care centers now, back in hunter-gatherer days, these kinds of conditions would put the group at risk). New children with the gene diversity of sexual reproduction are born with a greater likelihood of survival (not to mention that it hits the “reset button” on things like injuries that the previous generation occurs during their lives), so the means of reproducing and carrying on your genes through offspring vs. living forever is a superior approach to having a longer lifespan by a long shot in the biological realm.
Okay, so that makes scientific and logical sense...but people aren't usually asking for the scientific and logical explanation because they want to know why they have to die because they don't want to die. So...let's get metaphysical.
Metaphysically speaking, we’re here to grow through life experience. Given the realities of biology laid out above, it doesn’t make much sense to live beyond the natural human lifespan since your growth capability slows to a crawl by the end of life. Yes, you can still grow in knowledge and other non-biological forms, but it’s just so difficult at that point. Now, I won’t state my opinion on the existence of anything non-physical (so as to not influence anyone), but assuming that there is such thing as non-physical for the sake of argument, logically speaking, you’re better off having a time-capped life experience, return back to a non-physical form, and then (if return trips are a thing) come back as a new organism to have a broader/more diverse/completely new set of experiences. You just can’t get that by continuing to live a single lifetime with the same genetics, habits, and environment.
If you wanted to go one step further on the metaphysical front, you could argue that many religions have you here on Earth as a test, so if you come here, prove yourself, and then leave, you go to an everlasting afterlife of bliss. In that case, why on Earth (pun intended) would you want to stay forever?
Finally, let's talk about the meaning that a limited lifespan almost automatically injects into your life. If you had an infinite amount of time to accomplish what you want to accomplish, you'd use it as productively as you do those Sunday mornings when you have nothing to do: you lollygag. With a limited time, you instinctively try to get more in. That's what drives people to create bucket lists and accomplish as much as they can in the time they have because it is, in fact, limited. In addition, the reproduction that humans have gives you the opportunity to care for someone else more than even yourself and to know what it's like to have a life of greater meaning and purpose as you live for someone else's well-being and thriving. The combination of greater meaning in how you spend your time on Earth and the greater meaning in caring for someone who you love unconditionally and who unconditionally loves you...there's no parallel to that in a "live forever" scenario.
Note: All of the above is disregarding issues like overpopulation or imbalance in nature if things didn't die, how/why would organisms even evolve to reproduce at the organism level if you just needed one to survive forever, and other weird possibilities of being like the "I'm Connor MacLeod from the Clan MacLeod, and I cannot die" scenario. If you think about some of the crazy implications of everlasting life without the fear of death associated with being human, you might start quoting Queen: "Who wants to live forever?"
So there you have it: regardless of which belief system is true about what happens after you die, the science and philosophical logic are consistent in that humans and other organisms should have a limited shelf-life. Your body degrades biologically for the good of the species, you would only want to come here for a limited time to get the most from the one set of conditions you’re in and would either go back or take another trip from a completely different perspective next time, or you’re here for a test that, once you pass, you’re done and don’t need to stay. Finally, the limited lifespan enhances the meaning and joy that you try to squeeze out of life and, through offspring (or at least by supporting the next generation in some way), can create some of the most meaningful experiences you'll ever have. All roads lead to a life that terminates at some point for the well-being of all and, incidentally, greater meaning in the life you have, so you should embrace your limited time here and make the most of it!