Bach came to the Lutheran free city Leipzig in 1723 to assume the position of Thomaskantor (Cantor of St. Thomas Church). Bach’s duties, as Director of Music, included overseeing the musical activities, not just at St. Thomas Church but also at St. Nicolai Church, Neue Kirche, and St. Peter’s Church. Prior to this Bach was Kapellmeister or Konzertmeister (Music Director) at secular courts in Weimar and Köthen between 1708 and 1723, writing mostly keyboard and orchestral music. Unable to reuse his old compositions as is, Bach had to work hard to meet the demands of newly acquired position. The composer was required to write a cantata for every Sunday in the sacred calendar as well as other types of choral music for important religious celebration.
The text of Magnificat comes from the New Testament (Luke 1:46-55) and had been a part of the liturgy in daily Vesper services in the Catholic Church. In Leipzig in Bach’s days, the Magnificat was not normally sung but recited using Luther’s translation in German. Only on significant holidays — not just on Christmas — Maginificat with original Latin text was sung. Thus, Bach’s Magnificat was composed for those holidays on which the fully-orchestrated version of it was required. Today, the re-worked version of Bach’s Magnificat in D major, instead of the E-flat major original, is most frequently performed.
The E-flat version includes four Christmas interpolated texts, which seem to have been added later with red ink in Bach’s hand to his autograph. Because of the existence of the Christmas interpolations the work was once thought to have been composed for the Christmas of 1723. A recent study, however, suggests that it was written for the Feast of the Visitation. The D major version was indeed created for the same celebration day in 1733 (at that time the four interpolations were naturally dropped). For the reworking of Magnificat Bach transposed the whole piece a half step lower to D major and replaced the recorders with flutes, but the newer version received no heavy alterations. It is not entirely clear why Bach changed the key of the piece. Perhaps the decision was related to the quality (performance level) of musicians available to him. For string and woodwind players the key of D major is simply much easier to execute than that of E-flat major. In addition, the half step difference could make it easier for high voices like sopranos and tenors to sing. Today, the hybrid version of Maginificat — sung and played in D major with four Christmas interpolations — is gaining popularity.