The tangents are automatically set to make the curve go smoothly through the key.
This was the standard tangent mode prior to Unity 5.5, however way the curve was calculated would sometimes cause the value to overshoot before reaching the proper value.
In Unity 5.5 and onwards, the tangent calculations have been improved to avoid overshoots, but this legacy mode remains in the engine to allow for backward compatibility.
In general you should use AnimationUtility.TangentMode.ClampedAuto unless you are specifically dealing with legacy assets which relied on the old behavior.