 Then Shaphan the scribe told the king, saying, Hilkiah the priest has given me a book, and Shaphan read it before the king. Thus it happened, when the king heard the words of the law, that he tore his clothes. So there's the context for the tearing of the royal garments, because he realized that God had every right to tear the nation and the kingdom away from his chosen people.