I guess it's a good argument for the old practice of performing a "clean" macOS install occasionally.
Usually once every couple of years I would do this at the release of a new macOS. Essentially this consisted of creating a bootable macOS installer on a removable storage device from the App Store macOS installer, booting from it, erasing the internal HD (at the media level), naming, formatting and mapping it then installing the new OS. I would then reinstall all my files and apps (other than the native ones) by drag and drop from a previously cloned copy of my Mac.
I know this sounds exhaustive but it really only takes a couple of hours. The last time I did this was due to a repair performed by Apple on my M1 14" MBP which resulted in a blank (other than the OS) internal HD. A lot of personal data simply downloads from iCloud, assuming you synced everything. The rest, third party apps, the contents of my Documents folder and my Photos Library ect. I simply drag and drop from my clone. My email app (Spark) reinstalls my email accounts once I login. I usually elect to omit a few apps I never use and I find I have often gained around 100GB+ of storage thanks to eliminated "stuff" that has built up over time.
Yes, you have to reset all your System Settings but it's a bit like a refresher course and inevitably results in me changing a number of things for the better.
Bottom line is the device is completely functional after a couple of hours and the rest can be done over a few days. You end up with a computer that runs like new, faster, with more storage and stuff like your ghost file and other less obvious "stuff" all eliminated.
This whole process is good practice for when you have to do it which we all do from time to time. It highlights the advantages of a clone as compared to a Time Machine backup although I maintain both is a good idea, they each have their uses.