This side of eternity, we don’t know why God created dinosaurs. All we can do is speculate.
Catholic apologist Frank Sheed speculated that God’s act of creation was at least partly for our benefit. In other words, God knew that we would like it. The same could hold true for dinosaurs: God knew that the discovery of such fantastical creatures would fascinate and delight us, and perhaps that was reason enough for their creation.
Also, it may be that there are lessons we can learn from the existence of dinosaurs. Here are a few such possible lessons:
[list]Dinosaurs teach that there is such a thing as universal death, which is one of St. Thomas Aquinas’s five arguments for the existence of God (see What are Aquinas’s five proofs for God?).[/list]
[list]Dinosaurs teach the possibility of life after death. There may be no dinosaurs currently inhabiting our world, but, in a certain sense, they live on today – in our imaginations, in our scientific studies, in our hope that we may one day see such extraordinary creatures in the next life (see Do animals go to heaven?).[/list]
[list]The existence of dinosaurs forces believers to more deeply understand their religion and thus more deeply understand God’s hand at work in the world. Questions of the creation of the universe are thrown into a new light and we are forced to re-assess the merit of apparently simple understandings of divine revelation through the Church and the Bible. (See Testimony of Rocky Halls by Karl Keating.)[/list]
[list]The existence of dinosaurs forces unbelievers to re-assess their rejection of God that may be based at least partly upon the fact that they have not seen him with their own eyes. The fact that there are created beings that we know existed only because of the remnants of their lives that have been uncovered point to the existence of a God who can be known through the use of reason if one is willing to look at the “fossil record” of creation.[/list]