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).