I think this kind of writing is intended to inspire a "holy fear" of God, against those who might sin with complacency
Also to inspire a kind of love of virtue, and a striving towards doing good:
> "If you want to be certain of being in the number of the Elect, strive to be one of the few, not one of the many. And if you would be quite sure of your salvation, strive to be among the fewest of the few" -St. Anselm
https://www.olrl.org/snt_docs/fewness.shtml