Other than relatives you do sometimes get children named after close friends, or local worthies (the doctor etc), famous people, and so on.
It is worth considering what first names go with the name - I have one which nearly always goes with "John" which goes back from my grandfather to a marriage in the 1700s, and I'm sure if you looked at children with the middle name "Nelson" born in the UK you'd find a higher than usual number of Horatios among them.