History of the terms "prime" and "irreducible" in Ring Theory. In ring theory, a nonzero, nonunit element $p$ of a integral domain is called irreducible if $p=ab$ implies that exactly one of $a$ and $b$ is a unit, and it's called prime if $p\mid ab$ implies that $p\mid a$ or $p\mid b$, or equivalently if the principal ideal generated by $p$ is a prime ideal.
I assume that the notion of a prime number (integer) existed before ring theory was developed. The usual definition of a prime number is a positive integer with exactly two positive factors , $1$ and itself. This is equivalent to the definition of "irreducible." It also turns out that, since $\mathbb Z$ is a UFD, every irreducible is prime and every nonzero prime is irreducible. But since the usual definition of a prime integer is what we call "irreducible," why weren't irreducible elements called prime elements? Why was it decided the divisibility property was a more intrinsic property of "primeness" than irreducibility?
 A: I'm not an expert in the history of ring theory but this is, I think, pretty close to a correct answer:
You are right that the notion of "prime integer" predates the more general notions of "prime element" and "irreducible element" in an arbitrary ring.  In fact, prime numbers go back to ancient Greece!  But there is a missing link in the evolution of that original notion into the (two distinct) modern notions: namely, the notion of a prime ideal.
Ideals were regarded as a kind of "generalized number"; in fact, the original terminology was "ideal number", only later shortened to "ideal".  One ideal $I$ was said to divide another ideal $J$ if and only if $J \subset I$.  A prime ideal is then defined, in precise analogy with the "classical" definition of prime numbers (i.e. as indecomposables) to be an ideal that is not divisible by any ideals other than itself and the entire ring.
Once "prime ideal" was defined, the next development was to say that an element was prime if it generated a prime ideal.  It is a fairly straightforward exercise to show that this translates directly to the modern definition of prime element.  It is also fairly easy to show that (as long as there are no zero-divisors in the ring) every prime element is indecomposable in the classic sense.  So everything fits together quite nicely.
It is only at this point that somebody starts looking at rings like $\mathbb{Z}[\sqrt{-5}]$, which are not unique factorization domains, and realizes that those rings can contain elements that are indecomposable in the classic sense, but do not generate prime ideals.  Whoah!  So we need a name for those types of elements.  "Prime" is already taken, so they get called "irreducible".
So there you have it.  The elements that we now call "irreducible elements", despite the fact that they have the property that we usually associate with "prime numbers", were not called "prime elements" because that word was already in use for elements that generate "prime ideals", which are defined in direct analogy with how we "usually" define prime numbers.
