"Head scratching is so essential to birds that even one-legged individuals will attempt it." This according to the Birder's Handbook, which also says that it's purpose (in addition to spreading oil around) may be to remove molted feathers, discourage ecoparasites, or even to relieve pressure in the ear! It also says that some birds scratch by stretching their foot over the wing (such as this tree swallow photographed in Warren Co., NJ this weekend), and some scratch with their foot under the wing. It might be more typical to scratch over the wing, as they mention that 31 out of 38 wood warblers examined scratch this way, while only 7 prefer underwing scratching. Why, I don't know.