In Contreras, the majority observes: “Although the concept of a purely military offense predates the UCMJ by several decades, the MCM has never defined the phrase, and neither party here has been able to explain either the genesis or purpose of this limit on Article 130, UCMJ, prosecutions.” Contreras, slip op. at 4-5 (footnote omitted).
A look through old MCMs indicates that Congress first criminalized housebreaking as a military offense in the 1920 Articles of War as part of Article of War 93. But the “purely military offense” limitation didn’t appear in the 1921 MCM. Rather, the concept first appeared in the 1928 Army MCM (which was actually printed in 1927): “The term ‘criminal offense’ includes any act or omission violative of the Articles of War, which is cognizable by courts-martial, except acts or omissions constituting purely military offenses.” 1928 MCM, ¶ 149e.
So it appears that at some point between 1921 and 1927, the purely military offense exception was introduced into the law. Perhaps some enterprising TJAGLCS graduate student could attempt to run that to ground as part of a research paper. The Army JAG Decisions Digests for 1921-1927 (which don’t appear to be online) might shed some light on the subject. I assume that hard copies of the Digests are available in the TJAGLCS library.