They make a profit at the end of the supply chain, but all their materials are sourced at cost since the state is running the company. US companies have to pay profit all down the supply chain, which is why there is such an advantage to being able to vertically integrate your supply chain in the US. In China, is essentially all vertically integrated already.
And there is no contradiction between socialism and making a profit. Any enterprise owned under any organization, directed by any structure, could make a profit. What you do with those profits becomes interesting, if they exist.