Royalty free music is not free music. Musicians who spend their time and efforts to compose, record, edit and mix music are not doing it for free. The music can be licensed through music libraries to end users such as YouTube makers, film makers, and production companies for inclusion in their media productions.
Additionally, composers in most of the times – are selling their music exclusively to theri clients. That means that music tracks can be licensed more than once, in multiple users. Making a music track once, can end up creating income multiple time for the track composer.