The first thing to consider is that doors are ultimately mechanically locked. The large handles on the doors are locked shut by the cabin crew. The cabin crew closes the aircraft's doors once all passengers are boarded, but there is one final step before the cabin is completely secured.