PTY always served as a stopping point for long haul flights, so it makes sense that they would separate security and other controls.
Back in the day LanChile, Varig, Lloyd, KLM, and others stopped in Panama on their way somewhere else. It was not unusual in the 80s for passengers to be let off the plane to stretch their legs and shop at duty free stores as their plane made refueling stops in Panama.