How Are Airport Codes Determined?

Airport codes are a shortcut to identifying airports without needing to write out the full name of the facility. Whether it’s on checked baggage tags, boarding passes, or that inflight tracker, you’ll find airport codes at several places along your journey. Some of these three-letter codes make sense and correspond easily to the city you’re flying to. Others not at all. So how are they determined?

This is a companion discussion topic for the original entry at

Is it juts me or did I learn something here?