That last part is important. While Intel had good fab engineers, they also relied on cutthroat business deals requiring exclusivity to get discounts and promotional support and there were constant shenanigans with things like compiler support.
AMD had to make a much better product to get manufacturers to consider it, not just being price competitive. It took the P4 train wreck to get the market to shift but Intel had enough lock-in to make it to the Core generation without losing too much market share because so many of the vendors had those contracts.
And, to be clear, even though P4 was a disaster, Intel was STILL the market leader everywhere. They responded with the Core line only after years of AMD eating their lunch with the Athlon, Athlon 64, and Athlon XP line.
Thunderbird was released in 1999 and from there to the Core 2 Duo release in 2006, AMD was the performance leader (certainly at a huge discount compared to intel offerings).
AMD had to make a much better product to get manufacturers to consider it, not just being price competitive. It took the P4 train wreck to get the market to shift but Intel had enough lock-in to make it to the Core generation without losing too much market share because so many of the vendors had those contracts.