Well, for starters, the powerful headman/prince/king/nobleman/ whatever-is-applicable-for-historical-period-in-question would WANT his child (son, generally) to grow up to be powerful and significant after him - 'cause, you know, his kids. So it’s in his interests to promote the idea of heredity/“noble blood”, because it benefits his family. Any idea which is being promoted by the most powerful person/people in the society has an automatic leg-up.
Next, after this concept has been in a civilisation for a few generations, all the most powerful people will be themselves the beneficiaries of the concept of noble blood/rightful rulership. So, obviously, they will have a vested interest in keeping the system going.
Thirdly, in a pre-industrial civilization where there’s no universal education and frequent famines, it’s probably really the truth that the nobles and ruling families, who get properly fed all through their childhoods (or at least, have a better chance of it) and have time for education are a lot, lot smarter than the general run of peasants, on average.
And, in a violent age/society it’s quite an advantage to have a clear, well-accepted method of choosing the next ruler, because in cases where you have a number of guys contending for the job, that tends to end up in bloody wars and rolling heads. This still happened, of course, even with primogeniture, particularly when the heir was young and/or weak, but at least if there was a predisposition in society for everyone to be assumed to support ONE “most worthy” candidate, that promoted stability. It didn’t really matter for that purpose what the way was of choosing the one most worthy candidate, but “eldest son of the current king” was as good as anything.