The music is likely fair use since limited time period and not main use.
But fair use is complicated and there is no way it could be determined by algorithm. YouTube can’t trust the uploader. It doesn’t scale to decide by person. Fallback to DMCA process would be too expensive. Plus, fair use is only US. Easier to just deny copyright material.