To clarify the answer
@Ebeondi Asi gave, Unattached Units were never associated with a particular barracks. They are all troops not trained in a barracks. They can be obtained in many ways. Just a few are:
Through the Alcatraz Great Building.
As rewards in features like GE.
From the new purple chest Incidents.
As quest rewards.
Produced by certain special/event buildings, such as the Knight's Pavilion.
Troops that are trained in a barracks, and thus who disappear when/if that barracks is deleted/sold, are called "Attached Units".
Note: On PC you can toggle the orange stripe on/off, although why someone would want to get rid of it is beyond me.