Pilots are trained to perform aborted "go around" landings during emergencies, although the flight in question experienced no warning signs that a problem was imminent. The precarious maneuver was performed purely for the sake of showmanship, because there's nothing like a pilot with a zest for Top Gun-style theatrics.
"We wanted to make a mark, a dignified and emotional goodbye," one of the pilots reportedly told a German broadcaster.
The symbolism got kind of drowned out by the apparent recklessness of the stunt, however. According to a Reuters report, the pilot requested permission from air traffic control to perform a left-turn go-around landing, but the airline still feels the decision was more appropriate for a military air show than a commercial airport: