YouTube partners can upload a collection of files they claim rights on, and a YouTube bot will check any newly published video against anything in that database.
It's all automated. They don't verify if the claimant actually has the rights, this is left to the "dispute" process.
Sometimes multiple companies upload the same files. Sometimes the algorithm has false positives because the section of audio used is too short.