The quote reflects the idea that madness in those who hold positions of power can have serious consequences. When a leader is mentally unstable, they may make decisions that are harmful to themselves and to those they rule. This is why it is important to ensure that those in power are mentally fit to carry out their duties.
In the case of Hamlet, his madness is caused by the death of his father, the former king. Hamlet is unable to come to terms with his father's death, and his grief and anger manifest themselves in madness. This madness leads to Hamlet's downfall and the deaths of many others.
The quote "Madness in great ones must not go unwatched" is a warning about the dangers of allowing madness to go unchecked in those who hold power. It is a reminder that mental health is just as important for leaders as it is for anyone else.