1. TikTok is actually not Bytedance's most profitable product.
2. If you sell, you lose. If you let it get banned, you might just need to wait out the current political climate (i.e. end of the Israel/Palestine war; no one really cares about teens' health or some vague Chinese risk - the US can ban it overnight in case war ever erupts with China).
3. Even if they were open to a sale, it's beneficial to publicly maintain that they aren't.