The simple answer is that we don't! Not without asking, and it is very common to ask a person how their name is spelled when hearing it for the first time.
My last name, Rodes, I pronounce like the word roads. I've heard ROA-deez and ROA-duss quite a bit. The opposite side of this is if I tell people my name, I usually have to spell it out or they will spell it Rhodes, the more common spelling for the last name.
English is notoriously inconsistent in the way words with similar spellings are pronounced, and in the way words with similar pronunciations are spelled. Native speakers make mistakes in pronunciation (and spelling) all the time.
A well-known example is words ending in -ough, which have no fewer than five different pronunciations! Rough, dough, through, bough and cough are pronounced ruff, doe, throo, bow and koff. You'll also notice that dough and doe are homonyms, meaning that they sound alike while being spelled differently and having different meanings.
Conversely, the words was, does, fuzz and because all rhyme with one another: they are pronounced wuz, duz, fuz and bee-CUZ.
When I was younger, I heard the word "misled" (miss-LED) and understood it, but when I read it I thought of it as MY-zuld. It took me quite a long time to realize that they were the same word! So it isn't just ESL speakers who find this confusing. We all do, and much of our spelling has to be learned by rote.
As for proper nouns, we make mistakes even more often. The spelling of American cities and states, for example, can be extremely inconsistent with the way that they are pronounced, and mistakes are quite common.
Many city and state names are transliterations of Native American names for the areas or people who lived in them, some by the French and some by the English. States and cities that were originally French territories were often named whatever the Native Americans called them, written out using French pronunciation. These have often been altered over time by pronouncing the French words they were English.
For example, the city of Detroit is pronounced duh-TROYT or dee-TROYT. The Detroit River was originally thought to be a strait (a narrow passage of water connecting two large bodies of water, e.g. the Strait of Gibraltar). The French word for strait is détroit, pronounced (approximately) day-ter-WA. The English pronunciation took over entirely, probably because the French word is hard for English speakers to pronounce.
Another good example of this is Illinois. The original Native American name was pronounced ee-lee-nwah. Today, the French would spell this Ilinois, although spellings were much less consistent 300 years ago, and the spelling Illinois was common along with other spellings. English pronunciation of this word is ill-in-OYZ. But the final Z sound never got put on, so the present pronunciation of Illinois is ill-in-OY.
One more example is Michigan. The original Native American name was mee-shee-gah. The French Michigan is a close approximation of this. The American pronunciation is MI-shi-gun (the British say MI-tchi-gun). So you can see that the French influence on spelling plays havoc with the way that these words are currently pronounced.
If you google "pronunciations of cities in usa" you will see a number of posts with help on the matter.