Whistling backstage became bad luck during a time in England when stagehands were most often sailors without a ship.
The curtain, flies, and props were moved manually by a system of ropes, so the sailors communicated as they did at sea, by whistling.
If someone not involved in the intricate backstage maneuvers were to whistle, a stagehand might take it as a cue, which could be disastrous for the production.