For every video you see with copyrighted music, there are thousands that get taken down.
There are black hat techniques for trying to avoid recognition - it's easy to spot on actual video (flipping and adding effects or other videos around the edge), but AI is getting wise to those. A short clip or even a sample of copyrighted music will get taken down... eventually.
Those creators are just banking on their video getting some views before it goes down, and they are not in it for the long-haul, so they don't care if their accounts get banned.
However, it's not all doom and gloom. There is a TikTok Commercial Music Library you can tap into. Not sure I can post links here, but it's the first Google result for me. It has a couple of thousand tracks. Not great selection, but there are some emerging artists in there.