Understanding Thesaurus and Spelling Checker Behavior in Office 
Questions about the thesaurus and spelling checker used in Microsoft
Office have arisen as a result of users experiencing unintended results.
These unintended and sometimes inappropriate results are not caused by
bugs in the software, nor are they caused by tricks played on users by
software developers. To better understand that these results are
unintended, it is helpful to learn how the thesaurus and spelling checker
work.
The thesaurus and spelling checker both use an algorithm that
automatically calculates the most probable suggested word or phrase. If
the tool doesn't recognize what you have typed, it then presents you with
an alphabetical list of words (and phrases in the thesaurus), and
highlights the one that is closest (as calculated by the algorithm) to
what you have typed. For instance, if you type "Europ," omitting the final
"e" by mistake, the spelling checker or thesaurus will indicate that it
cannot find the word, but it will suggest the word "Europe" in order to
help you find the correct word quickly.
It is possible to derive an unintended but offensive meaning by
combining the search term and the word or phrase that happens to be
highlighted in the alphabetical list. However, the process used to
generate such a result is completely coincidental.
More information
Explanation of and Updates to Word 97 Thesaurus Behavior