I suffered from this situation sometimes. One of the flaps couldn't be retracted, so the aircraft banked to the side where the flap stuck. I thought that's because the speed exceeded the flap maneuver restriction and it led to the failure of the flap mechanism.