I was recently on a flight to Washington DC, but due to adverse weather conditions at DCA we were redirected to Philadelphia to await suitable conditions to land in Washington. When we landed at PHL, we were told that we would have to remain on the plane because the airline didn't have client services at that airport. It's not one that they normally fly to.
After some time waiting on the plane, the flight crew announced that US Customs would allow us out onto the jetway so that we could at least stretch our legs and get some fresh air, but we were still not permitted to enter the terminal.
Why was the airline and/or US Customs and Border Protection not allowing us into the terminal? Does it have to do with the fact that the airline doesn't normally fly to that airport? Or maybe it was because PHL closes late at night? (We landed at 11:20PM EST and took off again at 2AM.)
Here are some details about the flight(s), if the specifics help. I'm interested in general regulations and policies that address situations like this, though.
http://flightaware.com/live/flight/SCX235/history/20160203/2340Z/KMSP/KPHL
http://flightaware.com/live/flight/SCX235/history/20160204/0615Z/KPHL/KDCA