More generally, the most intrinsic modifiers are placed nearest the nouns they modify, and the most extrinsic (e.g. number) are placed furthest away.
The rule about commas only between modifiers of like or near-like category isn't absolute. Sometimes the modifier sequence reads best with a non-canonical comma somewhere.
Intrinsic: related to a property inherent in the thing itself, without regard to how much you have or how it relates to other tbings.
Extrinsic: what is not intrinsic, per above
Intrinsic and extrinsic are endpoints on a scale.
I first read about this 'rule' in the 1980s in a paper out of Bell Labs. It described how speakers and writers of prose regarded (or measured?) as clear (comprehensible?) actually wrote. I presume it was part of their studies in readability. So it's not an arbitrary rule, but the description of observed common and good practice.