Because Chinese control American supplies of widgets. You can check out Tesla, Apple, Walmart where they get their goodies from. Or how about Ametican universities. If things are as simple as a tic for tac, the trade inbalance wouldnt be in 200B+ in China favor.
Maybe it would be more balanced if China allowed US software companies into their country the same way the rest of the world does. (Except Russia, Myanmar, North Korea, and a handful of other similar places.)