Everyone here reading this will be dead in 100, 120 years.
Every nation and corporation we work and live under will be gone in a thousand, barring a few oddities.
Our Sun will cook the atmosphere, boil the oceans away, and maybe swallow the Earth up in 1,000,000,000 years and 4,500,000,000 years. If the Earth doesn't fall into the sun, its mass so miniscule that it'll barely register as a burp to that expanding and dying red giant, it'll be seared raw by the nova, and orbit a white dwarf until the sun, one day too, turns dark at last.
Our universe will rip apart or bunch up or break down to nothingness in 1,000,000,000,000,000,000 whatever years.
Everything ends. But we still strive because right now, everything is up and running and we like it that way.
The Federation will one day end, either they turn to a galactic polity like some old EU stuff says or humanity turns to energy or whatever. So what. Doesn't mean the stories of the Federation dealing with its problems suddenly don't matter or aren't interesting. The Burn, as much as I hate it, I do not take much issue with some roadbump happening to the Federation in whatever year. It's what happens between now and then that is, or even what the Federation does to survive and react to crisis and chaos, that is interesting.