Whenever I have seen unique factorization discussed, it is always with respect to the solution of diophantine equations; the equations are solved by splitting the equation into linear functions over a ring and then invoking unique factorization. But the discussions always give the impression that the failure of unique factorization causes all sorts of problems. Apart from the applications to diophantine equations, why is unique factorization such a desirable property? 



What goes wrong in a ring that does not have unique factorization?
I think a glance at any elementary number theory textbook will show you numerous topics which rely on uniqueness of factorization. The formulas for the number of divisors, the sum of the divisors, the Euler phi-function, all depend on unique factorization. Going up a level, the Euler product for the Riemann zeta function depends on unique factorization. 


