It’s a nautical superstition, dating from when ships were powered by wind, and to be becalmed was to be stranded.
If one whistled, long enough or the right way, a wind would manifest.
Of course, a wind would come up sometime, inevitably. The point was to get one before you ran out of fresh water, etc.
Be nice if it worked. The evidence, alas, is inconclusive.
Thank you so much for curing my ignorance of the reference.