I don't have the definitive answer to your first question, but I can make some educated guesses.
First, the critters are attracted to body heat. The human head radiates a lot of heat relative to the rest of the body.
Second, the eardrum inside the ear canal is close to "core temperature," which is warmer than the outer skin of the head and ear. That's why hospitals often take your temperature using a gadget pointed into the ear. So the flies might be particularly interested in the infrared glow coming from your ear canals.
Finally, the flies might be buzzing all around your head, but you
hear them more readily when they're just outside the ear canal. So there's a huge observation bias.
An alternative explanation is that the little buggers have detailed knowledge of human anatomy, physiology, and psychology, and they perversely choose to be as annoying as possible. I've often felt this is the best explanation.
