I don't know that it's clear that the motivation is that it's "helping" their competitors directly. Maybe the motivation is "if we rely on these, then the next time a US president arbitrarily decides to block us from buying them, we won't have the infrastructure already in place to be able to work around it". It seems more betting on a shorter-term cost with less uncertainty in the long term rather than a shorter-term win with a lot harder to quantify risks in the long term.
This was the Chinese government burning the boats[0]. Beyond the symbolism and ensuring everyone's commitment, they want to direct the firehose of AI money towards a local champion (Huawei). Money, and experience bourne of being in the trenches developing, manufacturing, deploying and debugging on actual workloads will supercharge how quickly Huawei get good, compared to when they had to fairly compete against a well-resourced Nvidia
0. Though it's not absolute - there's still the Singapore-based clusters loop-hole, that the Chinese government may choose the degree to which it turns a blind eye to, if progress is slow.
The money and resources aren't going to Huawei exclusively, but to a whole range of companies. This selection changes over time as new companies show promise, or previously selected companies prove themselves to be incompetent.
For example there are like 6 different technical tracks of EUV development. They're not committing to one technical direction, it's exploring all of them.