How do you figure that a locked cabin door will stop a hijacking? Sure, they can't fly the plane, but the only hijacking that I recall that needed that was 9/11.
All he needs to do is let the pilot know that he will start killing passengers, until he agrees to go wherever they want to go. But that's not what hijackers even want these days. They want to blow up the plane and kill everybody, and that's easy. All you need is a lithium laptop battery, pierce it, and you'll have an unquenchable 2000°C fire very quickly. How many laptop batteries are on a plane? Gather them up, get them burning, and that plane is going down. That's a successful hijacking, and they didn't even bother to try to get into the cockpit.
TSA/Airport security exists solely to discourage the potential hijacker from trying it at all, and choosing an easier, softer target, and it has been very successful in that objective. FACT, down votes be damned.