The 'fly' (flies) on trousers does not refer to the zip or buttons but to the flap of material that covers them. It has been used in this sense in terms of trousers, boots etc since the early 1800s. In the same way, the 'fly' of a flag is the part furthest from the flag-pole...ie the 'flappy' bit. Over time in the case of trousers, as it happens, the meaning has somehow transferred to the zip itself.
It's kind of you to say so, M, but - as I've often said here on AnswerBank - you could fill hangars with stuff I don't know. I've just lived for quite a long time and picked up a few scraps of knowledge along the way, as well as having access to some excellent research resources. Nevertheless, my thanks again.