The answer is to prevent aileron reversal at high speeds. When ailerons are used at high speed the wing tends to flex, leading edge down, due to the forces acting on the main wing section and aileron. It also aids in keeping the airflow over the wing smooth and, in the event of an accident where the engine breaks away from the pylon, the front mounting point is weaker than the rear. This means the engine will tend to fall away from the wing rather than take the wing out.