So if the letters go by the size of the city or town in Germany, how come Hanover is H, yet Hamburg, being 3 times the size, is HH?
Hamburg, along with Rostock, Bremen and some other coastal ports, are proud members of the Hanseatic League and all have added the H to their registration numbers: HH, HR, HB. It's a fascinating subject. The Hanse is still a thing, dating back to the Middle Ages. It was an association of trading ports, similar, I imagine, to the Cinq Ports in Southern England.