Names have meanings because they were used to describe a person's characteristics or profession. Like, someone who worked as a tailor would take the last name
Taylor. They would find a word that described themselves and use it as their name.
Other names, especially surnames, were created from the names of parents. For instance,
Henderson means "son of
Henry". So, the name
Henderson would have originally been given to someone whose father's name was
Henry, to identify that person as
Henry's son.
In many countries, words are still given as names, although it's not as common in English-speaking countries. For instance,
Esperanza is a common Spanish name, but it is also the Spanish word for hope.
An example in English would be
Chastity, which a name but is also a word meaning purity. So those names have meanings simply because they were just words to begin with.
I know this is a little confusing, and I might not be answering the question very clearly. If you have another question about this I'll try to answer it.
If anyone else wants to clarify this more that would be great.