The remarkable compositional diversity of volatile ices within comets can plausibly be attributed to several factors, including differences in the chemical, thermal and radiation environments in comet-forming regions, chemical evolution during their long storage in reservoirs far from the Sun, and thermal processing by the Sun after removal from these reservoirs. To determine the relevance of these factors, measurements of the chemistry as a function of depth in cometary nuclei are critical. Fragmenting comets expose formerly buried material, but observational constraints have in the past limited the ability to assess the importance of formative conditions and the effects of evolutionary processes on measured composition. Here we report the chemical composition of two distinct fragments of 73P/Schwassmann-Wachmann 3. The fragments are remarkably similar in composition, in marked contrast to the chemical diversity within the overall comet population and contrary to the expectation that short-period comets should show strong compositional variation with depth in the nucleus owing to evolutionary processing from numerous close passages to the Sun. Comet 73P/Schwassmann-Wachmann 3 is also depleted in the most volatile ices compared to other comets, suggesting that the depleted carbon-chain chemistry seen in some comets from the Kuiper belt reservoir is primordial and not evolutionary.