I get your theory on why you don't think the stock market is productive, but I think it is necessary for China right now. China already limited the growth of real estate prices, Chinese money have to go somewhere domestically, they can't all buy government bonds (already ultra low yields), gold or stakes in private tech companies (which requires a substantial chunk of cash).
For the past few years most Chinese casual investors are forced to put some of their money in foreign products like bonds and stocks. If China wants to de-dollarize, building a whole financial system is a must, this includes a healthy stock market. The previous stock market was seriously unhealthy imo.