Sanctimonious means to make a show of being moral, to act as though you think you are better than others. In your first example, it would suggest that the government claimed that they wanted to catch the perpetrators and were trying hard to do so. In your second example, it would suggest that the writers of fairy tales believed that they knew what is morally right, and were trying to get you to share their views.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.