If it's only a "minor" windshear (if there is such a thing), then you have plenty of performance available and it wouldn't make much difference. However, the procedure is devised for the worst case where you're pitching to the shaker/eyebrows - depending on avionics fit. In this case retracting the flap risks a configuration stall, as well as reducing the available lift. Even that small amount of lift could be the difference between arresting the descent in time or not. You leave the gear down to act as a shock absorber for the impact...