Rosa Luxemburg  (also Rozalia Luxenburg; Polish: Roza Luksemburg; 5 March 1871 - 15 January 1919) was a Polish Marxist theorist, philosopher, economist, anti-war activist, and revolutionary socialist who became a naturalized German citizen at the age of 28. She was, successively, a member of the Social Democracy of the Kingdom of Poland and Lithuania (SDKPiL), the Social Democratic Party of Germany (SPD), the Independent Social Democratic Party (USPD), and the Communist Party of Germany (KPD). In 1915, after the SPD supported German involvement in World War I, she and Karl Liebknecht co-founded the anti-war Spartacus League (Spartakusbund), which eventually became the KPD. During the November Revolution she co-founded the newspaper Die Rote Fahne ("The Red Flag"), the central organ of the Spartacist movement.

Luxemburg wanted to move to Germany to be at the centre of the party struggle, but she had no way of obtaining permission to remain there indefinitely. In April 1897 she married the son of an old friend, Gustav Lubeck, in order to gain a German citizenship. They never lived together and they formally divorced five years later. She returned briefly to Paris, then moved permanently to Berlin to begin her fight for Eduard Bernstein's constitutional reform movement. Luxemburg hated the stifling conservatism of Berlin. She despised Prussian men and resented what she saw as the grip of urban capitalism on social democracy. In the Social Democratic Party of Germany's women's section she met Clara Zetkin, of whom she made a lifelong friend. Between 1907 and his conscription in 1915 she was involved in a love affair with Clara's younger son, Kostja Zetkin, to which approximately 600 surviving letters (now mostly published) bear testimony. Luxemburg was a member of the uncompromising left-wing of the SPD. Their clear position was that the objectives of liberation for the industrial working class and all minorities could be achieved by revolution only.  The recently published Letters of Rosa Luxemburg shed important light on her life in Germany. As Irene Gammel writes in a review of the English translation of the book in The Globe and Mail: "The three decades covered by the 230 letters in this collection provide the context for her major contributions as a political activist, socialist theorist and writer." Her reputation was tarnished by Joseph Stalin's cynicism in Questions Concerning the History of Bolshevism. In his rewriting of Russian events he placed the blame for the theory of permanent revolution on Luxemburg's shoulders, with faint praise for her attacks on Karl Kautsky, which she commenced in 1910.  According to Gammel, "In her controversial tome of 1913, The Accumulation of Capital, as well as through her work as a co-founder of the radical Spartacus League, Luxemburg helped to shape Germany's young democracy by advancing an international, rather than a nationalist, outlook. This farsightedness partly explains her remarkable popularity as a socialist icon and its continued resonance in movies, novels and memorials dedicated to her life and oeuvre." Gammel also notes that for Luxemburg, "the revolution was a way of life," and yet that the letters also challenge the stereotype of "Red Rosa" as a ruthless fighter. But The Accumulation of Capital sparked angry accusations from the Communist Party of Germany; in 1923 Ruth Fischer and Arkadi Maslow denounced the work as "errors", a derivative work of economic miscalculation known as "spontaneity".

Answer the following question by taking a quote from the article: what did she do there?
in order to gain a German citizenship. They never lived together and