Gear is the only part of the aircraft designed to take impact load. It will withstand even hard impact but fuselage won't survive. If gear was not retracted prematuerly Dubai crash aircraft may not have broken up. Retracting landing flap causes small loss of lift but retracting gear will add drag till it is retracted.