“Let us hear the conclusion of the whole matter: Fear God, and keep his commandments: for this is the whole duty of man. For God shall bring every work into judgment, with every secret thing, whether it be good, or whether it be evil.” - Ecclesiastes 12:13-14
Imagine you'd spend your life creating useful inventions, somehow improving this world, helping others, clean up pollution, etc. Making the lives of people currently alive and all their descendants just a little bit more fun, happy, comfortable or interesting.
Now imagine you'd spend your life doing shitty stuff that spoils the fun and makes life miserable for everyone & those that live after you.
Note that "all their descendants" could be many many billions or even trillions+ humans (if humanity manages to not go extinct 'soon'). That's ignoring other living creatures.
With that in mind, wouldn't it be a small sacrifice to put in a bit of effort to not screw things up for those that come after you?
No need to be a saint. It's about finding a balance between having some fun for yourself, while not spoiling the fun for others - presently alive or in the future.
Religion need not enter this consideration. If it helps/comforts anyone to use as guideline, power to them. But a simple "how would future humans look back on my actions?" does the job.