Gratitude has a grounding effect. It put the blessings of your life into perspective and reminds you of your dependency on Heavenly Father. It humbles. One of the first things Lehi did after leaving Jerusalem is to thank the Lord. He built an alter of stones and offered burnt offerings, similar to what had been done from the days of Adam. I would assume that most of the burnt offerings Lehi offered to God in the past were offered on the alter in the temple, by a priest. Lehi building his own alter and offering his own burnt offerings was probably new to him and his family, but not strange- Lehi was starting a new dispensation, he was being separated from the tree of Israel and was now responsible for the spirituality of his branch. What better way to start than for Lehi to build an alter and thank the Lord for warning him to flee the destruction to come?