My trans has the same number 42 and the HD.
My guess is that the TH400 had the HD cast on the case to differentiate it from the TH350.
I haven't been to a GM assembly plant, but the plants I have been to try to make it real easy for the operator to pick the correct part for the correct build. The transmissions probably came into the plant on a skid of 6 or 8 transmissions. TH350 all on one skid, TH400 all on another skid. There is typically a paper build sheet on the conveyor that the operator looks at to select the correct part (in this case a transmission). There would be a bunch of skids all next to the assembly line, typically with the same type of transmission in the same place all the time. So the build sheet would tell him or her to select the TH400 trans and the HD cast into the case would be a visual indicator that they'd selected the correct part. Typical cycle time at a plant is around 60 seconds so visual identification needs to be real easy, in my experience the operator has to get the transmission out of the skid, over to the conveyor and start at least 2 bolts and hook a safety chain to the tail shaft as part of their task.
My guess for the number was going to be the mold that cast that particular case. Could be that it is coincidence my trans has the same number. Or it could be for some other reason.