Ecclesiastes 10:5

There is an evil which I have seen under the sun, as an error which proceedeth from the ruler:

The evil seen under the sun as an error proceeding from the ruler is folly lifted up to dignity and influence, and that exaltation is an evil that can injure and damage the kingdom. The condition is explained by what follows, that folly may be set in great dignity. Solomon's turning away from God is the illustration of this, for his apostasy weakened his influence for good, and his sinful example led many astray and set evil in motion toward idolatry and worldly practices.

Even after he repented, the harm done by his example could not be undone. His repentance could not fully restore confidence in his leadership. Such misuse by a ruler of God-given power can leave harmful effects that continue through later generations, traceable in the wrongdoing of later rulers.