Many of the codes are long-established, going back to London Buses Limited (LBL) (and in many cases earlier) days, and are well known among staff and enthusiasts.
In the early part of the 20th century, the London General Omnibus Company allocated its garages codes by going through the alphabet — initially A, B, C, etc.
[1][2] Since the start of tendering in 1985, some codes have also reflected the name of the owning company, examples being AH (Armchair, Brentford), EL (Eastern National, Chelmsford), WI (Wings, Uxbridge), BE (Blue Triangle, Rainham).
[3] In several cases (TB/TC/TL and QB) the code reflects both the location (Bromley/Croydon/Lewisham (Catford), Battersea) and the original owning company (Tilling, Q-Drive).
[2][3] During the period of operation by London Transport and its predecessors, indeed back to the earliest motor buses in the early 20th century, the garage code was clearly carried on both sides of the vehicle.