a) China is turning inward, maybe they're getting some state support, monetary, political, or otherwise; or at least benefiting from a lucky coincidence.
b) SMIC has been credibly accused of misappropriating TSMC secrets in the past, and settled.
c) I think a number of major Chinese manufacturing companies invest resources and money in them, possibly as some form of insurance policy.
d) The Chinese government does procure armaments, maybe SMIC does manufacturing they've been asked not to talk about.