I'll stop typing my broadly-identical answer to @Bill's. But I would note that this is entirely a style issue and might be better asked at Writers.SE -- but check their FAQ and Terms of Reference first and do provide more context, as Bill has suggested.
–
Andrew Leach♦Dec 9 '12 at 10:15

5 Answers
5

I see no problem with the phrase that's why in informal speech, or the word that's in an essay. However, in “Fancy flights used to fill me with euphoria, that's why I named myself Joseph...” you have a run-on sentence structure. To avoid it, replace that's why with conjunction so:

Flights of fancy used to fill me with euphoria, so I named myself Joseph...

(I replaced “fancy flights” with “flights of fancy”. “Fancy flights” might refer to elaborate airplane trips or getaways, even perhaps Joseph in his coat of many colors fleeing to Egypt. “Flights of fancy” refers to imaginings, to thinking of desired things, of castles in the air.)

Formal essay encompasses a wide range of styles: everything from an article on mathematical logic to a craftily composed but deliberately chatty personal blogpost. Kris' NGrams inform you that published usage has shifted over the past 50 years; I'm inclined to attribute this not to a substantive change but to a relative increase in the number of “semi-formal” publications.

Your best guide is to follow the practice of other essays published in the medium for which you are writing and addressed to the audience whom you are addressing. Use the language which others in that speech community use.

And if you are asking about a “formal essay” for an examination, follow the instructions of your teacher, who is your only important audience. If it's a standardized exam, the consensus of coaches and advisors is Do not use contractions at all. The worst that can happen is that your language will come off as a little stilted, but that is not necessarily a bad thing. The purpose of these essays is to test your mastery of formal English, not colloquial English.

Good advice. You might also want to consider how many "formal essays" you will be writing for your teacher during the rest of your life, and how useful such a skill will be once you leave school.
–
John LawlerDec 9 '12 at 16:12

On contractions in general, Pam Peters writes in ‘The Cambridge Guide to English Usage’:

The writers of formal documents may feel that they undermine the
authority and dignity of their words. But the interactive quality that
contractions lend to a style is these days often sought, in business
and elsewhere. They facilitate reading by reducing the space taken up
by predictable elements of the verb phrase, and help to establish the
underlying rhythms of prose.

If you're in any doubt about how your readers will react to contractions, then it's perhaps best to avoid them. But, as always, what you do depends on the textual, and the wider social, context.

Until 1940, the expression does not seem to have been preferred by writers.

Towards the end of the century, that is why was predominantly the phrase to use.

In the 1950s, there was a trend reversal so that about 1982, that's why seems to have started gaining wider acceptance and usage.

We may have to infer that today, writers prefer the contraction over the longer idiomatic phrase.

Drawing inferences from Google nGrams is fraught with pitfalls and one needs to be cautious. They can help in supporting a broader research.

[EDIT]
One possibility would be as StoneyB points out 'a relative increase in the number of “semi-formal” publications.' However, see also Barry England's citation on the interactive quality and how contractions facilitate reading (by avoiding distraction, or aiding in better focus.)