This sounds like a perspective from a finance/law person who doesn't understand how engineering works. Technological and engineering expertise ultimately come from human capital. That human capital is built through learning and practicing. Money plays a role, yes, but it's not everything, and is sort of an abstraction.
On the one hand, China "wastes" money by having to build everything themselves. On the other hand, importing foreign technology has always been the cheap way out (that many Chinese company voluntarily signed up for, until they no longer could). You don't own the technology in the sense that you don't (need to) truly understand it. This is different if you have to build everything yourself: you own it and understand every little part of it. This "waste" results in a ton of spillover effect: it builds a huge domestic supply chain and human capital basis that's not at the mercy of foreign IP demands. You can see this spillover effect in the renewable energy and EV market, for example. They spent decades learning how to build batteries, solar panels, electric engines, etc. and now the whole is bigger than the sum of the parts: expertise in building solar panels has positive spillover effects on the semiconductor industry because some of the technology is shared; expertise in building batteries is synergetic with expertise in building electric engines; etc.
This is one reason why for example India has more trouble with developing than China. Often times, India imports foreign technology but stops there, being mere users of said technology. China imports foreign technology, but considers it merely as a first step towards learning the underlying technology. They will try to modify or rebuild some part of it, learn from the successes and failures, and iterate until they've modified/replaced everything and understand the whole machine. And from there they would try to improve it. Some call this "stealing technology". Okay. But don't forget that the Europeans during the Renaissance had this philosophy that in order to become excellent, you first have to copy the classics (Romans), then create something equally valuable to the classics, then surpass the classics. This is China doing the same, but I understand it if people don't like it.
China had been trying for decades to incentivize its own semiconductor companies to develop, but failed to do because all the Chinese semiconductor companies chose the cheap way out, and imported foreign technology, instead of buying from domestic tool makers. As a result, domestic tool makers lacked practice, which is why they didn't develop in quality very quickly. This created a chicken and egg problem that was hard to get out. Until the sanctions did what the Chinese government failed to do. Yes, they hurt in the short term. But they provided an important opportunity in the long term.
All of this is "wasteful" from a globalist, financial perspective. But it's absolutely godsent from the perspective of China being a developing country that 1) still needs to lift up a lot of people, not only out of monetary poverty, but also out of educational and skill poverty, and 2) wants to improve their sovereignty, in the sense of becoming more resilient to foreign sanctions and being able to walk their own path without interference from others.
Truly, money is not everything. The real economy is not all about money. GDP is but a proxy for real value.