What's the reason behind using UIA and MSAA for the Coded UI Test framework? Especially why are WinForms controls handled by MSAA instead of UIA? MSAA doesn't have the SearchProperty AutomationID as UIA does, so finding controls is based on the less unique names (which are more likely to change), types and classes.
The Win32\Windows Forms control natively supported MSAA and not UIA whereas WPF supports UIA natively. This is the reason for using MSAA for Win32\Windows Forms and UIA for WPF. There is MSAA to UIA & vice-versa conversion available via built in proxy\bridge but that is an extra layer of dependency which could eat into performance etc.
When you use UIA for Windows Forms, it just maps ControlName property of the window as AutomationId. The Coded UI Test Builder also uses this ControlName property if it is present.