> Before adding this line of unit test, there is no enforcement

Unit tests help guard against regressions, since the order was an existing behavior and a breaking change the unit test helps guard against it being changes, as with your proposed optimization PR.