We have built-in default joint correction to handle edge cases and ensure that the joints bend correctly in most animation cases, such as when the arm/leg joints form a straight line or when the joints are bent backwards. Under normal circumstances, Unity's retargeting system would take care of this convention and automatically retarget custom animation so that it isn't an issue. However, for developers who directly manipulate the humanoid rig without the retargeting system, they may run into instances in which the elbow/knees are bent in the wrong direction and the default correction logic doesn't apply.