back in the XP days, I used a software called “Unlocker” just for this problem. It probably still exists, I don’t know, because since Windows 7, the easiest way to find out what process locks a file is to open Resource Monitor (Start search: resmon) and the bottom list on the CPU tab you can search the file name and you will find the process.

So yeah, Resource Monitor is a useful tool on Windows.

There’s a collection of free little utilities called Microsoft PowerToys, including the file unlocker thing. Why would they not include these into base kit Windows is beyond me.
GitHub - microsoft/PowerToys: Microsoft PowerToys is a collection of utilities that help you customize Windows and streamline everyday tasks

Microsoft PowerToys is a collection of utilities that help you customize Windows and streamline everyday tasks - microsoft/PowerToys

GitHub
I feel like it’s a testing ground for new features for them, but not sure why some aren’t yet integrated. Best guess: the PowerToys team has less red tape and checks to go through than the Windows team to allow for faster iteration, but that means that integrating the features wouldn’t be just the click of a button since they’d have to adapt it to fit the Windows style. But this is just a wild guess.
I think you’re right on the money. There seems to be a component of enticing power users to stick with Windows as well. The app is still “in beta” despite the first release being in 1996 (!). I had to look that up, because I’d only heard about it in the early windows 10 days.

The first version of PowerToys was released for Windows 95 on 17 November, 1996 as a download on Microsoft’s FTP server at the time.

Well wadaya knows?

I like that it wasn’t a proper installed thing, just a bunch of executables in a zip file.