I'm confused by the CP/M reference. Author says it'll be important later then proceeds to explain how it had nothing to do with CP/M or the 8080 CPU.

Agree, CP/M has nothing to do with the story, nor does the 8080/8086 sidetrack.

The whole story is that Microsoft just never bothered to standardize, despite using it themselves.

could you quote the text you are referring to?

"Rewind to 1973. The operating system common on microcomputers was CP/M. The CP/M operating system had no environment variables. That sounds like a strange place to start a discussion of environment variables, but it’s actually important."

Just a few lines below:

"Over time, programs were written with MS-DOS as their primary target, and they started to realize that they could use environment variables as a way to store configuration data. In the ensuing chaos of the marketplace, two environment variables emerged as the front-runners for specifying where temporary files should go: TEMP and TMP."

And before that there are a few paragraphs describing the migration of applications from i8080/Z80 based CP/M towards x86 based DOS via mechanical translation.

I was curious seeing this thread, and I just looked and don't get it either. AFAICT the CP/M references could have been entirely omitted and nothing in the narrative about TMP and TEMP would change.

Except that DOS was made to have its first programs ported from CP/M, so it’s relevant to explain that there were no environment variables to inherit from CP/M and no developer habits or program standards to inherit from CP/M programs.

Which is irrelevant to TMP or TEMP.

It could simply be: When envars were added to MSDOS…