Because they arent selling at a loss. The business pipeline is subsidized by the state. But end to end from mining the minerals to shipping you the solar panel everything is "in house". Its all in China. Thats why why can sell so cheap. Its even cheaper to make.
This narative that the CCP is just subsidizing all business to "beat america" is just dumb. Its the build process being made cheaper by the government. Not the final product.