While SEA (Seattle) and BOS (Boston) may seem to be obvious codes, have you ever wondered where there others came from?
This article goes into excruciating detail about how airports get their codes. It's fascinating reading.
When the Wright brothers first took to the air in 1903, there was no need for coding airports since an airport was literally any convenient field with a strong wind. However, the National Weather Service did tabulate data from cities around the country using a two-letter identification system. Early airlines simply copied this system, but as airline service exploded in the 1930's, towns without weather station codes needed identification. Some bureaucrat had a brainstorm and the three-letter system was born, giving a seemingly endless 17,576 different combinations. To ease the transition, existing airports placed an X after the weather station code. The Los Angeles tag became LAX, Portland became PDX, Phoenix became PHX and so on. Incidentally at the historic sand dune in Kitty Hawk where the first flight occurred the U.S. National Parks Service maintains a tiny airstrip called FFA—First Flight Airport.