Securing Failed/Damaged engine is first priority to prevent further complications from it. Acceleration to clean up and resuming climb is to maintain certain gradient profile for terrain clearance. There are two limiting altitudes for acceleration, the minimum and maximum. By exceeding the minimum acceleration altitude the gradient of climb profile is not affected. But the maximum should not be exceeded as it will cause 10mts limit on takeoff thrust to be exceeded.