They also do some things like sprinkle in random fresh videos, potentially unrelated to your interests, to your "For You" to get exposure to them and a base idea of how long people look at them, which is nice because it potentially boosts small creators to larger audiences.
Further, I'm pretty sure they see what creators are keeping the most people on their platform for the longest, and directly compensate them. This gives rise to a host of "lifestyle accounts" where folks can live doing the things that some chunk of the userbase wants to be doing, and they'll get paid directly from TikTok, rather than needing to source a third party company to sponsor them.
All in all, I think it's fantastically designed -- to the extent I'm not sure it should exist at all.