The whistles were worn on the flight jackets of the aircrew in case they were shot down or crashed into the sea. Air sea rescue could pinpoint the aircrewman's location if visibility was bad due to fog by the blowing of the whistle.
Exactly the same concept as the emergency whistle attached to a modern plane's lifejacket. I've always assumed the civilian version follows the military practice, as with so many other things.