TikTok sale has nothing to do with economics, it's all about internal politics, not even foreign.
TikTok hosts many groups hostile to Trump that were successful at ruining his rally in Tulsa, and could have some more tricks in their arsenal with elections in sight, so he desperately needs to take control of the platform and the users, and the only way to do that is for a US company to acquire it. Before elections of course.
It's a win-win scenario for both Microsoft and Trump: Microsoft gets a big user base and Trump their personal data.