irreducible: An element r in a ring R is irreducible if r is not a unit and whenever r=ab, one of a or b is a unit.

prime: an element is prime if the ideal it generates is a prime ideal.

Then they show that in any commutative ring, all primes are irreducible, and in a principle ideal domain (PID), irreducibles are also prime. Then they go through a bunch of stuff to show PIDs are UFDs, and finally that, in a UFD, it's also the case that irreducibles are prime. In other words, in a UFD, which is the setting for which irreducibles were originally defined, primes and irreducibles are the same thing. Why the distinction then? Or at least, when defining a UFD, why not do it in terms of primes instead of irreducibles? The end result is the same, isn't it?