The codes for Bremen and Hamburg incorporate an "H" for Hansestadt as their first letter. The codes for Lower Saxony (Niedersachsen), Saxony and Saxony-Anhalt avoid the more intuitive but historically tainted NS (for Nationalsozialismus) and SA (for Sturmabteilung).
Deviant codes or abbreviations have been used traditionally especially for the (western) compound-named states and they remain in common use today. They often have three letters instead of two.