Surprised that nobody has mentioned YEG YUL YVR YYZ and the many other Canadian codes which lack logic.
There are others where one can find a thread :
CWL - Cardiff WaLes
It's also worth bearing in mind that city codes (LON MOW etc) are used for several purposes by reservations systems (GDSs).
An availability request for flights from LON to MOW would give all routings, e.g. LHR-SVO, LGW-DME, LTN-DME ..... whereas a request such as LGW-SVO would filter.
The codes are also used by GDSs for hotel and car database purposes, so a request for a hotel/car rental at LHR would, by default, give locations loaded under that code, therefore Heathrow airport hotels and car rental outlets, as well as those in Staines, Uxbridge, etc. A request for LON would give hotels in London.
Taking it a step further, there is also a situation where a city code is shared with an airport code and used for the main airport, eg, SIN, but there is another airport with its own code. BKK is another example, where BKK is now used for the new Suvarnabhumi airport and the old Don Muang has another code (forget what it is).
In Europe a lot of railway stations have IATA or pseudo IATA codes used for GDS purposes, such as QQP for Paddington, and the station serving airports such as AMS, ZRH, FRA have codes.
Trying to remember codes is not a good idea. Years ago I did a magnificent wind up on a young sales clerk in an agency who issued someone a ticket to Los Angeles but in the fare construction part where you had to write the codes she wrote LOS instead of LAX. LOS is of course Lagos, and we got someone to phone her and pretend to be the passenger, 'phoning from Lagos! She was a bit more careful about codes after that.
When I worked for a shipping agency we used to send lots of seamen to FUK.