It isn't only whilstling, nobody sings at their work now either.
Frankly, I seem to remember both going out when walkmen came in.
No need to make your own music if you can listen to others making professional music while you work, seems to be the thinking.
If indeed, anyone actually thought about it. Probably the change just occured.
I was told the proverb as " A whistling woman and a crowing hen are neither good for God or men"" Girls were allowed to whistle for a dog, but not to whistle tunes, and it was frowned on if you whistled in your fingers, or stuck a (grubby) finger in your mouth and whistled.