RAF pilots did carry guns during WWII, primarily for self-defense if they were shot down and needed to evade capture. While their main role was aerial combat, having a sidearm provided some measure of security on the ground.