If you store your music on an external drive, and that drive becomes unreadable for some reason (disconnected, or read-only as mysteriously happened to me), iTunes will silently start storing new tracks on the internal drive, and will switch the storage preference from the external path to the internal one. Result is that your collection gets split across multiple devices, without you knowing about it.
When you finally discover this has been happening, you could have hundreds of albums stored in the wrong place. Here’s the fix: After re-attaching or repairing the external drive, re-set the storage location in preferences, then select all tracks (tens of thousands is just fine), right click on the selection, and choose “Consolidate Files.” This will trigger a script that examines the location of every track referenced in your library and copy it to the preferred location if it’s not there already. Nice.