I know nothing of this event beyond that “some pilot went nuts on an airplane at the gate.” So some of what I say may be irrelevant to the actual case at hand. I’m trying to answer the OP’s Q as asked.
Agree with Richard’s bottom line that somebody who started doing actual pilot preflight stuff is civvies should be stopped & investigated by his/her crewmate. That is totally outre. And we *are *expected, by both management and the union, to be our brother’s / sister’s keeper.
Here’s more context / background …
Most US carrier’s practice that I’ve seen or been subject to works about like this …
A pilot working a flight will be wearing the company uniform. Ref Marion_Wormer: Hats were pretty universally required back in the 80s to 90s. A decent fraction (25-30%?) of pilots refused to cooperate with the hat. And, yes, managers & QA pilots were out patrolling a bit for non-compliance. Since about 2000 many carriers have bowed to the inevitable and hats are officially optional. That’s the case at my carrier and about 5% of our pilots still bother with them. I never minded the thing and always wore it. But when it became officially optional I parked it and haven’t worn it since, nor do I miss it. Most carriers no longer require the suit jacket in summer, but do require some jacket in winter. The rest of the outfit is not optional to work a flight.
Pilots routinely travel in civvies. Lots of pilots don’t live in the city where they work and ride a flight to get to or from work. A common technique is to wear the relatively non-distinctive uniform pants & shoes with an ordinary dress or polo shirt & perhaps a windbreaker. Then switch shirts, put on the tie &, if winter, the suit coat. After all, you’re dragging a suitcase everywhere you go so carrying one extra shirt is no big deal.
At crew bases there’s usually a crew work & lounge area backstage someplace with a restroom to change. Smaller airports will have backstage areas for the local employees although itinerant crewmembers often won’t have access to them. Changing clothes is certainly done in the public restrooms or even on the airplane when the customers are off.
At a crew base of a big airline the backstage area will include a darkened room full of lounge chairs & airline pillows and blankets. 24/7/365 it’ll be half-full of half-dressed pilots snoozing. Either they commuted in and have 5 hours until they report for work, or they finished work last night at 11pm and the next flight to home leaves at 6 am, or maybe they’re just killing 3 (unpaid) hours mid-shift.
Being in civvies, changing clothes, taking a sink bath, shaving, etc., is all bog standard stuff backstage.
I drive to work, not fly, but before driving home after a trip I’ll sometimes swap my shirt & tie for a polo so I can stop at the grocery store or wherever on the way home without looking like a total dork (AKA fish out of water).
Security is another factor. Crewmembers must clear through TSA either by being inspected just like passengers or by a bypass process. Uniforms aren’t relevant. If you have the required ID you can go through screening or the bypass if it’s available at that airport. The bypass process includes a live-real time computer check to make sure you didn’t get fired 10 minutes ago.
As a separate matter crew cannot board the aircraft until they and their ID are checked by gate agents against the list of expected crewmembers. It’d be unusual, but far from unheard of, for a pilot to show up at the gate in civvies or wearing the obvious (to us) half-uniform. If asked, the pilot would say they intend to change on the airplane. Odds are they wouldn’t even be asked if their credentials checked out. We’ve all seen it before.
This may or may not be relevant to this instant case, but there are often pilots on a flight who aren’t the pilots working it. They’re just riding as passengers either in the cabin or in the cockpit. They may or may not even work for the airline operating the flight.
They’re admitted down the jetway to the aircraft using the same sort of process as any paying customer: Reservation -> boarding pass -> agent with computer scanner at the door. Depending on the carriers’ specifics they might get on early ahead of the preboards or last or anywhere in between.