Authors choose names carefully.
They have to fit the age of the person and their time. For example, Ernest or Edwin or Ethan go with different historical eras.
They must be different enough from other characters that readers don’t get confused. Mary and Maddison and Mandy would be too much.
And it’s important not to use a name of someone well known. I always search the internet for every name to check this. It’s particularly important if the character is a villain — real people could be VERY upset if their name is an evil person in a book.
Right now I’m wrestling with this problem for a villainess. I though Tamara, but, not sure. Could I get away with Lavender Lundy? What parent would saddle their child with that! Decisions decisions. I’ll let you know the answer when I decide.