They walk on with a pre-arranged agreement
I've seen them - very obviously - board a plane in plain clothes before anyone else is allowed to board. Which makes them stick out like a sore thumb, especially for those real passengers who ARE the first to board, and see them sitting there trying to look inconspicuous.
They get past the airport scanners by arrangement between the airlines, airport security, and the airport managers themselves - after all they are considered security officers there to protect the passengers and airlines (more the latter I feel).