as far as i'm concerned, the monarchy's purpose is to be where the power of government is derived. the crown's legitimacy is, in turn, derived by divine right/sovereign authority and tradition
you might say that this is just a convoluted system whose practical purpose isn't meaningfully different than that of a republic which derives its authority from a constitution and 'the people', but i disagree. first of all, it sets the government up to be the custodian of the nation, not its master, thereby subjecting it to a higher authority. second, the crown is the soul of the nation, by instantiating the tradition and culture of the people in the royal family it preserves national identity and custom. thirdly, the monarchy is inherently interested in the longevity of the nation, since its stability is to (ironically) represent the interests of the common people and act according to their interests.
what you're missing from elective monarchy is all that i've mentioned. it's a bonapartiste regime. democratic and egalitarian. you may as well do away with it all together and form a republic.