Oracle has no interest in running afoul of the US government at all. Their internal culture in many ways views them like that of a quasi-government institute. So in thus case they probably are feeling responsible to actually be the ones enforcing the law.
I imagine shutting down ByteDance is not like flipping a switch. They have a mountain of infrastructure and “shutting down” could mean nuking the data or otherwise getting it out of their cloud entirely. If it has to be done by a certain date you’d need to start nuking things well in advance to be absolutely certain you’re in compliance by the deadline. I’m surprised the shutdown happened as late as it did if this wasn’t a completely staged crisis.