The problem with XP 64-bit was that it just wasn’t ready. This was their first real foray into 64-bit, and it was plagued with problems. And then you had compatibility problems due to 64-bit drivers not being mainstream. It was a lousy OS for consumers.
Similarly, the big jump to Vista which reinvented a lot of things, even for 32-bit, wound up not being fully ready. You had driver problems in both. And Microsoft assumed computers would be more powerful than they were, meaning Vista on a typical Windows XP machine ran too slow. And, even on more powerful machines, Vista seemed slow because it didn’t optimize 2D graphics.
That’s why XP held on. It wasn’t some decision by Microsoft. They just stuck with the market, which wanted reliable XP over unreliable and slower Vista. Microsoft did their best to make Vista better, and probably succeeded towards the end, but it was too late.
With Windows 7, however, I will say they made a mistake. There was no easy way to upgrade from Windows XP to Windows 7, even just the 32-bit version. You would lose all your programs if you upgraded. If your computer already worked well enough, you weren’t going to spend $100 and then have to completely set things up again.
They basically had to wait until the computers running XP weren’t good enough or died out for Win7 to take off enough that they could shut down XP. To be honest, it was probably the propagation of 64-bit programs that needed more memory that did it.
That’s why, when developing Windows 8.1 and Windows 10, Microsoft wised up. They made sure you could upgrade from Windows 7, their beloved product before then. And, with W10, they gave it away free to try and get people to try it. (Not that W10 didn’t have its own problems, since they were trying out a whole new paradigm. I’m still waiting on some of them to be fixed, like those stupidly time-consuming 4GB updates. And just nagging people turns them off, even if W10 would be perfectly find for their needs.)