We know that an integral domain $R$ is a UFD (unique factorization domain) if each nonzero, nonunit element of $R$ can be written as a product of irreducibles, and the factorization is unique if the following sense: If $r = q_1\cdots q_n = q'_1\cdots q'_m$ (given two factorization of $r$ into irreducibles), then $n = m$ and for each $i$ there is $j$ such that $a_i$ and $a_j$ are associates.
But does the converse also hold? Say, $r = q_1\cdots q_n$. If $q'_1\cdots q'_n$ is an element of $R$ such that $q'_1$ and $q_1$ are associates, then $q'_1\cdots q'_n = r$. It it true, or no?
If $(q'_1) = (q_1)$, then we can write $q'_1\cdots q'_n$ as $u_1\cdots u_nq_1\cdots q_n$(where $u_i$ is a unit in $R$ such that $q_i = u_iq'_i$). And they are equal if an only if $u_1\cdots u_n = 1$. I see no reason for that to always hold. Is there one?
As @Rob Arthan pointed out (and as you noticed yourself), there is no reason to believe that $u_1...u_n=1$.
When you think about UFDs, think about integers (one can say that UFDs were developed as a generalization of integers).
For example, $6=2 \cdot 3$. And even though $2 \sim (-2)$ and $3 \sim 3$, we know that $$2 \cdot 3 \neq (-2) \cdot 3$$