Gas Path gives the formula. Tom Cat gives the official reason. Seems like all the Boeings do it but differ in the method.
Does anyone remember the reason for the 'Aileron Upset' on the Vickers (or BAC)VC10? The ailerons were tipped upwards when the flaps were extended and faired off when the flaps were fully up. It was suppposed to provide wing bending load relief in some way.
**********************************
Through difficulties to the cinema