Why this works:
A fly does not take off like an airplane. To get the acceleration neccesary to become airborne, a fly must make a vertical leap. Once it is in the air, its wings start going, and it gains control of its flight. When you sweep your hand over it, it is making this initial leap, and it will hop directly into your hand as it tries to fly away.
It's tricky to do, but very rewarding if you can master it. The technique is especially good for those of you who don't believe in killing living things, as the fly remains intact to do with as you wish. Personally, I like to torture and annoy the little buggers, like they do me. You may have to experiment with the height as well, as it depends on the fly, and how fast you swing your arm.