I know I'm new (first post!) && this is an old post but... I arrived to this thread when trying to find the answer to the same problem, so I figured it best that I help others.
The reason this is happening (and it happens only when sorted is set to false) is in fact the lines above, but not at the fault of NGUI mind you.
These lines:
Transform myTrans = transform;
mChildren.Clear();
for (int i = 0; i < myTrans.childCount; ++i)
{
Transform child = myTrans.GetChild(i);
if (child && child.gameObject && (!hideInactive || NGUITools.GetActive(child.gameObject))) mChildren.Add(child);
}
It is well documented (by not being documented at all!) that there is no guarantee when iterating over a transform the order of the children it returns - despite what you see in the inspector panel (which is always alphabetical).
Google 'unity3d transform children order' and you will see that the order is not guaranteed, and in fact GetChild is no longer part of the documentation as Transform interfaces from IEnumerable and so should be foreach'ed instead. Even when using a foreach though, you have no guarantee of order (when not using NGUI's sorted flag).
Two suggestions - either preface your children's names with a consistent label (such as "btn_") or implement your own sorting algorithm if alphabetical is not what you want.