Answer by taking a quote from the following article:

Ernst Theodor Amadeus Hoffmann (commonly abbreviated as E. T. A. Hoffmann; born Ernst Theodor Wilhelm Hoffmann; 24 January 1776 - 25 June 1822) was a Prussian Romantic author of fantasy and Gothic horror, a jurist, composer, music critic, draftsman and caricaturist. His stories form the basis of Jacques Offenbach's famous opera The Tales of Hoffmann, in which Hoffmann appears (heavily fictionalized) as the hero. He is also the author of the novella The Nutcracker and the Mouse King, on which Pyotr Ilyich Tchaikovsky's ballet The Nutcracker is based. The ballet Coppelia is based on two other stories that Hoffmann wrote, while Schumann's Kreisleriana is based on Hoffmann's character Johannes Kreisler.

From 1796 Hoffmann obtained employment as a clerk for his uncle, Johann Ludwig Doerffer, who lived in Glogau with his daughter Minna. After passing further examinations he visited Dresden, where he was amazed by the paintings in the gallery, particularly those of Correggio and Raphael. During the summer of 1798, his uncle was promoted to a court in Berlin, and the three of them moved there in August--Hoffmann's first residence in a large city. It was there that Hoffmann first attempted to promote himself as a composer, writing an operetta called Die Maske and sending a copy to Queen Luise of Prussia. The official reply advised to him to write to the director of the Royal Theatre, a man named Iffland. By the time the latter responded, Hoffmann had passed his third round of examinations and had already left for Posen (Poznan) in South Prussia in the company of his old friend Hippel, with a brief stop in Dresden to show him the gallery.  From June 1800 to 1803 he worked in Prussian provinces in the area of Greater Poland and Masovia. This was the first time he had lived without supervision by members of his family, and he started to become "what school principals, parsons, uncles, and aunts call dissolute."  His first job, at Posen, was endangered after Carnival on Shrove Tuesday 1802, when caricatures of military officers were distributed at a ball. It was immediately deduced who had drawn them, and complaints were made to authorities in Berlin, who were reluctant to punish the promising young official. The problem was solved by "promoting" Hoffmann to Plock in New East Prussia, the former capital of Poland (1079-1138), where administrative offices were relocated from Thorn (Torun). He visited the place to arrange lodging, before returning to Posen where he married "Mischa" (Maria, or Marianna Tekla Michalina Rorer, whose Polish surname was Trzcinska). They moved to Plock in August 1802.  Hoffmann despaired because of his exile, and drew caricatures of himself drowning in mud alongside ragged villagers. He did make use, however, of his isolation, by writing and composing. He started a diary on 1 October 1803. An essay on the theatre was published in Kotzebue's periodical, Die Freimuthige, and he entered a competition in the same magazine to write a play. Hoffmann's was called Der Preis ("The Prize"), and was itself about a competition to write a play. There were fourteen entries, but none was judged worthy of the award: 100 Friedrichs d'or. Nevertheless, his entry was singled out for praise. This was one of the few good times of a sad period of his life, which saw the deaths of his uncle J. L. Hoffmann in Berlin, his Aunt Sophie, and Cora Hatt in Konigsberg.  At the beginning of 1804 he obtained a post at Warsaw. On his way there, he passed through his hometown and met one of Cora Hatt's daughters. He was never to return to Konigsberg.

Why caused that?
Masovia. This was the first time he had lived without supervision by members of his family, and