How did the Holy Roman Empire end up with such a unique system of government?

by sideshow9320

The HRE had a very unique system of hereditary electors voting for emperor, how did this come to be?

Superplaner

I wrote about this before basically explaining how the herediitary monarchy of the HRE was born but of anyone feels like elaborating further I'm sure it would be much appreciated.