UIKit after four iterations (i.e., iOS 6 in 2012) was far from its "very early days": it was a well-designed, production-ready, powerful UI framework that was way closer to AppKit than SwiftUI (in its fourth iteration) is to UIKit now.
They weren't starting from scratch.