This post discusses several factors responsible for variations in spelling, with examples.
For much of the history of the English language, spelling was more an art than a science; because of lapses in literacy, there was no standard orthography. Even now, well into the twenty-first century, thanks to ignorance and laziness (and some intentional slangy sabotage), misspelling is rampant, so many people are unaware, for example, that alot is not an acceptable synonym for many or that definitely, not defiantly, is what you write when you mean “most assuredly.”
Some valid reasons for alternate spellings exist, however. One annoying but hopelessly entrenched cause of spelling variations can be blamed on American lexicographer and spelling reformer Noah Webster, who advocated diverging from English orthography in favor of a uniquely American (but frustratingly inconsistent) spelling system. Fortunately, many of his suggestions failed to catch on, but others prevailed, so that now we have such international discrepancies as defense/defence, honor/honour, meter/metre, and realize/realise. (See this post for a more detailed discussion with more examples.)
Often, writers in the United States are unclear on the distinction, so that we see, for example, judgement instead of judgment, or grey when gray is correct. This kind of thing can get confusing when, for example, an exception is made for glamour but not glamorous and glamorize, or when woolen is spelled as such but woolly takes a different form because of the adverbial inflectional ending. Another complicating factor is when the British English spellings centre and theatre are employed in signage for venues in the United States.
It’s easy enough, though distracting, for someone raised to read American English to understand written British English, and vice versa. But many international businesses publish materials reflecting both systems to distribute to various global audiences as appropriate, and book publishers have been known to change from one to the other when creating new editions of already published books. (I know this because I’ve been the one responsible for making or checking the changes in both contexts.) However, it’s nearly impossible to catalog (or is it catalogue?) the distinctions (though one can try).
Spelling can also vary based on context. For example, antennae and antennas are both correct, but the appropriate spelling depends on the subject matter (anatomical and technical, respectively), and the plural of appendix can be treated appendixes or appendices. (See this post for more examples.)
Another type of variation is one based on informal usage: Donut as a variation of doughnut and thru as a truncation of through are valid in certain contexts, but careful writers will use the standard spellings in formal writing. The same goes for yes/yeah and no/nope; in each case, the second alternative has its place, but that place is only when slang is appropriate, as in dialogue. And nonstandard spellings like lite and nite are acceptable only for playful proper nouns (as in the name of a product or a venue.)
In addition, spelling sherbet with an extra r (sherbert) may reflect the way the word is often pronounced, but that misspelling is just as egregious as the unholy union of alot and the misuse of defiantly. And spelling the term for a short-sleeved pullover top “tee shirt” ignores the fact that it was named for the shape of the garment when laid out flat and should therefore be styled T-shirt.
Sometimes, older spellings of words persist, as when both analog and analogue or omelet and omelette are variably employed; in such cases (actually, in all cases) let the dictionary be your guide. (See this post for a list of such terms.)