In good weather, a pilot might be told "the airport is 5 miles on a heading of 360 degrees" or something similar, and is expected to visually find the airport. Surprisingly, airports are not that easy to see unless you are within a couple of miles.
So if you are not familiar with the area and you fly the given heading and see an airport ahead, it's reasonable to assume it is your destination. If there is another airport nearby, as was the case here, well ...
I almost made this mistake a couple of times flying into new airports.
There was a recent US commercial flight that did this - put it right down in a military airfield.