Mathematically speaking, the cartesian product is unordered.

It's easy to check for the exact order produced by cartesianProduct, of course, but then it would be tied down to this particular implementation. You wouldn't be able to, for example, implement an improved cartesianProduct that permutes the order of arguments in order to, say, support a product of n input ranges with n forward ranges in any order (and reorders the output so that they match the original order). Such reordering would allow us to further relax the requirements on the ranges.