Actually, it's not the zipper that's the fly... it's the fold of cloth that conceals it. Fly is a very old word meaning something attached on one side, like a flag, or a tent flap, or the flap on a garment that conceals a fastener. It's related, at the root, to the sense of flying, like a flag.
And did you know that Clergy in the 1920s and 1930s described zippers as allowing one to take one's clothes off too quickly, thus hastening illicit sexual activity. Clothing with zippers was seen as inappropriate to be worn by women because of this belief, and was not fully adopted until the late 1950s.
More History of the Zipper