This is only a rule of thumb, there are a number of exceptions e.g. Germany's second largest city Hamburg (HH, Hansestadt Hamburg, because of its historical membership in the Hanseatic League) or the west German district Ammerland (WST, Westerstede is the capital of the district).