Florent Lefortier answered
Dinosaurs didn’t have a purpose any more than any other creature does! Like birds, and bears, and even humans, the dinosaurs' main aim would just have been to live as long as possible and to reproduce.
As a dinosaur, everyday life would have revolved around hunting (or find a tasty tree), and avoiding hunters. There were some pretty big dinosaurs back in the day, and some of them would be looking for lunch.
Mating would also have been important (there probably wasn’t much else to do, either – I don’t think dinosaurs had much in the form of entertainment) and so a lot of time would have been spent finding a mate to continue the species with. From the amount of time that dinosaurs were around for, they must have done pretty well!
Nesting would also have been important to female dinosaurs, as they’d have needed a safe place to lay their eggs. I expect the females would also have had to raise their young.
As a dinosaur, everyday life would have revolved around hunting (or find a tasty tree), and avoiding hunters. There were some pretty big dinosaurs back in the day, and some of them would be looking for lunch.
Mating would also have been important (there probably wasn’t much else to do, either – I don’t think dinosaurs had much in the form of entertainment) and so a lot of time would have been spent finding a mate to continue the species with. From the amount of time that dinosaurs were around for, they must have done pretty well!
Nesting would also have been important to female dinosaurs, as they’d have needed a safe place to lay their eggs. I expect the females would also have had to raise their young.