TITLE: Why worry about commutativity but not associativity in The Fundamental Theorem of Arithmetic?
QUESTION [27 upvotes]: A common statement of The Fundamental Theorem of Arithmetic goes:

Every integer greater than $1$ can be expressed as a product of powers of distinct prime numbers uniquely up to a reordering of the factors.

Now the statement makes a point of mentioning that factorization is unique up to reordering of the factors, saying basically that we don't have to worry about it because multiplication in the integers is commutative. But why not specify that it's also unique up to the choice in which order we multiply the factors? I.e, that we don't have to worry about it because multiplication in the integers is associative too? If we insist on multiplication being a binary operation, then we need to define some grouping when we have a product of more than two integers. Shouldn't there be a clause in the Fundamental Theorem that indicates, for example, that $30 = (2\times (3 \times 5))$ and $30 = ((2\times 3) \times 5)$ are not distinct factorizations? ​

It should be noted that some answers to this question were merged from another question, so they may not be completely consistent with this question exactly as it's stated.

REPLY [2 votes]: Tl;Dr: the philosophy to view associativity as a more primitive notion than commutativity, is a consequence of viewing a finite set as a sequence, and of writing formulas on one line. If we were aliens that are used to view a finite set as a full binary tree and to write down formulas in various graph-like shapes, we would probably consider commutativity as being the more primitive notion and instead of
$\qquad$Prime factorization is unique up to a reordering of the factors.
we would say:
$\qquad$Prime factorization is unique up to a repairing of the factors. Bleep.

Uniqueness up to reordering the factors, really means: There is a sequence of prime numbers (possibly with repetition) whose product is $n$.
As Derek Elkins points out in his answer, the magic lies in the word product: It assumes we have defined what it means to take the product of a finite sequence of integers. We could define the product by multiplying the first and the second, then multiplying that result with the third, and so on:
$$\prod_{i=1}^4p_i = ((p_1p_2)p_3)p_4$$
Note how we don't need associativity to define this. But associativity is an interesting property, since it implies that we get the same result by defining the above product as, for example,
$$p_1(p_2(p_3p_4))$$
But in "the product of a sequence", the absence of any indication of where to put the brackets, suggests that we don't want to specify that, meaning that this phrase is well-adapted only to associative operations.
Likewise, "the product of a multiset" is a phrase that is well-adapted to associative and commutative operations.
Full binary trees are well adapted to commutative operations:

(src)
("Full" means that every node has 0 or 2 childs.) It's a way to iterate an operation in a setting where we care about associativity but no commutativity: write a number at each leaf (a node without children). Multiply any two leaves with the same parent, write the result at their parent node, erase the two leaves and repeat the operation with the resulting tree.
Compare with
$$2 \cdot 7 \cdot 3 \cdot 11$$
where we (may) care about commutativity but not about where to put the brackets. The algorithm is now: choose any two adjacent nodes, multiply them and consider them as one node.

To conclude, besides the fact that associative operations occur more naturally (composition of functions is associative), another reason why we use notations and terminology that are well-adapted to associative operations, is that we write line by line (sometimes column by column), instead of writing in the shape of trees and graphs.