The marriage mashal:
Choosing a partner could very well be the most important decision in life, and it may (hopefully) last for life. Therefore, one should not approach such a decision with the knowledge that, for example, every five years he will have a chance to change his decision, or that, perhaps, even if he chose to stick with her for another five years, after ten years, he must find another, because that will detract from the gravity of all of his life decisions, even if ending the marriage is warranted in extreme cases.
So too with a nation. A democratic and fair process should be employed to ascertain who should rule since such a decision is the most critical in the life of the nation. But it should be infrequent, with the condition in mind that it is meant for the long haul, and not to be regularly re-evaluated and likely changed every few years.
The democratic aspect of the initial election is required by the halacha. The Sages said in B’rachoth:
“אמר רבי יצחק: אין מעמידין פרנס על הצבור אלא אם כן נמלכים בצבור, שנאמר “ראו קרא ה’ בשם בצלאל” (שמות לה, ל). אמר לו הקדוש ברוך הוא למשה: משה, הגון עליך בצלאל? אמר לו: רבונו של עולם אם לפניך הגון, לפני לא כל שכן? אמר לו: אף על פי כן לך אמור להם. הלך ואמר להם לישראל: הגון עליכם בצלאל? אמרו לו אם לפני הקדוש ברוך הוא ולפניך הוא הגון, לפנינו לא כל שכן?”
And: אין מעמידין מלך אלא על פי בית דין של שבעים ואחד, the Sanhedrin being the representative body of the community.
Thus, we find that it was the elders of the people who asked for Saul, and who had to make the decision to accept him as king, and likewise with David, who despite being chosen by God, had to get the support of the elders of the nation in order to actually rule, and this explains why even though the right to rule is hereditary, Rehoboam had to go through a process of election and acceptance by the people when his time came.
This also explains how many times the new king was put in place “by the people.” (E.g., Omri, Jehoash, Amaziah, Josiah, Jehoahaz, etc.)