הַצַּדִּ֣יק אָבָ֔ד וְאֵ֥ין אִ֖ישׁ שָׂ֣ם עַל־לֵ֑ב וְאַנְשֵׁי־חֶ֤סֶד נֶֽאֱסָפִים֙ בְּאֵ֣ין מֵבִ֔ין כִּֽי־מִפְּנֵ֥י הָרָעָ֖ה נֶאֱסַ֥ף הַצַּדִּֽיק׃
義人死去,卻無人放在心上;虔誠的人被收去,也無人明白:義人被收去,是為了免遭將要來臨的災禍。
Ibn Ezra
The righteous perisheth, etc. There is nothing but the deeds of these evil shepherds; the righteous are gone, And no man layeth it to heart to consider, why do the righteous perish, and those wicked people remain alive; but the prophet gives the answer to this question: The righteous is taken away from the evil to come, that he should not see the evil that is coming over Israel and the holy city.
Rashi
with no one understanding what the Holy One, blessed be He, saw to take him away.
Rashi
that because of the evil destined to befall the generation, the righteous man perished.