The Boeing Model 307 Stratoliner was pressurized. Decompression does not pick and chose between commercial and military aircraft. B29's flew at high altitudes and the rate they were being built were more likely to be made quickly.
Because the Comet flew higher the metal suffered greater stresses. The altitudes jets are most efficient at are thousands of feet higher than any piston engined aircraft. The max altitude of the B29 is a little under 32000ft and would have usually flown several thousand feet lower. The Stratoliner flew at 20,000ft. The Comet flew at 42,000ft. The stresses on the airframe increase as the difference between the apparent internal altitude inside the fuselage and the actual altitude of the aircraft increase. DeHavilland were pushing the limits of what was understood about the stresses on pressurised aircraft construction far beyond anything that had gone before.