In designing a wing you design it so the wing stalls from the root first out to the tip (washout, wing shape etc.) this helps stopping the wing dropping since if it stalls at the tip first you have a larger moment arm if one wing stalls before the other. If you put flap down then that part of the wing will not stall as soon as it otherwise would, since the flaps are normally positioned inboard for structural reasons this moves the point of stall outboard, increasing the moment arm and the chance of wing drop.