Mojave with iTunes 12.9.5 (latest available).
The only thing the songs have in common is that I 'Consolidated' them or opened a Get info window. Both of which means that iTunes moves the files into where it thinks they should be and in the case of files type Music, that is now in the Media folder and not Media/Music where they should be.
Did I say the files are on an external drive? It is an internal drive, just not the main Startup Disk. iTunes prefs point to the correct folder on that drive and everything has worked that way for over 10 years, no problem whatsoever. Well, not that iTunes doesn't have its quirks, but in this respect it has always behaved impeccably, when configured to do so (which it is) storing all media files in their respective sub folder in the the Media folder. Until recently.
As I said, Consolidate files means iTunes will move them to where it thinks they should be. Likewise if you 'Get info' it will check the file's location and instantly move it to where it thinks it should be, if not already there. Also if you change a file's type, it will again move it to where it thinks it should be according to that type, i.e. music files in the Media/Music folder, podcasts in Media/Podcasts, etc. This all works as expected - EXCEPT for music files which it clearly now thinks should be in the Media folder and NOT Media/Music. Any of the above actions on ANY file and iTunes does move it to the expected sub folder in Media, except music files. Change to type Podcast and the file is moved to the Media/Podcasts folder. Change it back to Music and it is moved to the Media folder.
For some unaccountable reason, iTunes now thinks that files of type Music should be stored in the actual Media folder which it has only recently started doing and is clearly wrong.
This occurs with Any file(s) I try.
I quit iTunes and deleted all its pref files and restarted. No change, still doing it wrong.
Restarted the Mac and as expected, still same problem.
Ran iTunes (same version) from a full backup (cloned) disk, made before I ever noticed this problem. Same problem.
Tried same iTunes from the cloned disk, but using the library on that cloned drive - same problem.
However, I cannot guarantee that the clone was made before the problem actually started as I have not been doing anything with the music files for quite some time. So it is possible the problem began some time ago, but was not apparent as I had not touched the files. I did start working with the files about a week ago and that's pretty much when I noticed the problem.
It has occurred to me that the later Music app does store the music files in its Media folder, as other file types are stored elsewhere anyway so no need of the sub folders as used by iTunes. Is it possible there was an actual iTunes update fairly recently that introduced this aspect of Music.app, either intentionally or unintentionally? Dumb idea either way, but a bit of a stretch to think some later Music.app code somehow migrated into an iTunes release.
The version reported by iTunes is 12.9.5.5 (although just 12.9.5 shown in Finder). Is this a recent update? I don't have obvious access to an earlier version to test.
One thing that I do recall is a few days ago, probably about the time I first noticed the issue, I had a problem with iTunes. It froze and I had to Force Quit. It started back up no apparent problem, but it's the sort of thing that can create odd problems. However, since I have tested a copy of iTunes, and a library file from before that Force Quit event and also with new prefs, I cannot see how it can be connected.
Basically, something has changed within iTunes that makes it think Music type files should be stored in its Media folder and not Media/Music and I'm still at a loss to figure out why and how.
BTW, to prevent this occurring every time I try and look at any track's info, I have removed write permissions from the Media folder, so iTunes now CANNOT move files there. Since the type sub folders (e.g. Media/Music) are still writable, it should still work ok, but no doubt there will be some unexpected repercussions from this sledge hammer solution. Hence I still need to figure out what on earth is going on here that is making iTunes behave like this.