Imagine you are a census enumerator in the late 1800s in a predominantly immigrant section of the U.S. Many of the people you are counting can neither read nor written in English. In fact, many of them speak little or no English. How do you insure that you have understood the names and gotten the information correct? The answer is, you don't. You simply write down what you hear and leave it at that.
Even in places where English was spoken and understood, many of the entries made on census records were done phonetically. However, phonetic transcription of names, dates, places and other information is not confined to census records. Anytime, the official transcribed information from a person under less than ideal circumstances, there was an opening for error.
I can't count the number of times I have been told by a novice researcher, that the entry I found could not be their ancestor because that isn't the way the name is spelled. In truth, the possibilities for variations in the way names are spelled is enormous assuming the person recording the information didn't just get the name wrong. I have a relatively common name -- Tanner. But it is surprising how frequently it has been heard and written as "Taylor" or "Turner." Just think about the possibilities of a name like "Nowakoski" or "Kleinschmidt."
There is an interesting article with a general discussion of the spelling problem from The Spelling Society called English spelling and its Reform: Some Observations from a Historical Perspective by Donald G. Scragg. To add some more complexity to the issue of spelling names, standardized spelling is a relatively recent phenomena. Many people historically wrote their names a variety of ways. For example, John is written as: Ion, Iohn, Jan, Jehan, Jehn, Jen, Joan, Joen, John, Johne, Johan, Johann, Johanne, Johannes, Jon, Jone and many more variations. For more variations see A Brief Discussion of Spelling Variations.
Also, don't forget nicknames and shortened names. In some cases Margaret becomes Maggie and Elizabeth becomes Betty.
One way to approach the problem of spelling is to read names out loud. In some countries, such as Spain and other Spanish language areas, this may be the only way to understand what has been written. But even in English language areas, reading the entries out loud may disentangle some phoneticized transcriptions.
Here are a number of further reference sites you may wish to review:
A short history of English spelling
Phonology, Phonics, and English Spelling
Historical Background to English Spelling Or, Why in the World is English Spelling So Crazy
The History of English: Spelling and Standardization in English: Historical Overview