Matthew
One big thing in epic fantasy books that I find too hard to swallow: nobody has the same name.
Brandon Sanderson
This is for convenience's sake. I've actually done it where I used the same name before. It gets so confusing to readers. So confusing. In fact, when I do it on purpose, my editors usually change it, because it is so confusing.
Like, in Stormlight, what I'll end up doing, is I'll say, there are core names. Kaladin's name is based off Kalak, the Herald. You've got two characters basically with the same name, where one is based off the other. Kaladin's name is the Rosharan's version of, like Matthew. There is this saint: this Herald. But the way I do it so that we don't get too confused is I change each one a little bit. Kaladin is their version of Matthew. Shallan is their version of Mary. She's named after Shallash. So you'll see a lot of Shalla- names and Kala- names. And, as we had earlier, we have Ishikk, who's named after Ishi. You'll have a lot of Ishi- names. This is my acknowledgement to you that, in a real fantasy world, more of them would probably have a lot of duplicate names, like we have now.
Granted, there are cultures where there are much fewer duplicate names than exist in, say, English and Chinese and things, where a lot of duplicate names are used. But you are noticing a correct thing, and I just have to say, for writing convenience, this is one of those things where fiction has to be stranger than truth. Because otherwise it just gets so confusing.
But I bet you could write a book where you did it, it was a plot feature, that a lot of people have the same name, that you could make it work.
You've requested a couple of characters in Stormlight that have the same name. Well, I've done that... kind of. That's about as close as we'll get. I do have some minor characters that I'll use the same name for. But like I said, my continuity editor really, really, really likes it when I don't do that, and asks me to change them.
It is fun that you noticed this, because this is one of those things ('cause I love linguistics) that I notice a lot. And I'm like, "Is there a way around this?" And I try to find ways that work both for the convenience of telling stories, but also work for worldbuilding realism. Maybe I'll put two characters of the same name in just for you in the future. We'll see.