It is behaves like this. THStack does not have TAxis objects inside, but create histogram when first drawing is performed. Therefore you cannot access X axis before.
The axis system of the THStack is determined from the elements of the THStack histogram collection, as part of the drawing. So indeed, if you want to resolve the inconsistency you’d have to draw the histogram, then fix up its axes, then update the canvas also for histograms to make it symmetrical with THStack. Note that THStack isn’t the only object behaving this way; TGraph (and its GetHistogram()) is a popular other example.