Yes, but there's no universal law that Life must persist.
It's totally possible that Life just dies. Like due to increased solar heat or a random comet.
Dinosaurs (and other saurs) wandered Earth for hundreds of millions of years, humans are just a blip on the radar. But dinosaurs wouldn't be able to predict Sun's death and do something about it.