What's the motivation of the definition of primary ideals?
I've seen this question many times. The problem is that the second definition is strictly weaker than the first.
Consider $(x^2,xy)$ in the ring $F[x,y]$ where $F$ is a field. According to the normal definition, it is not primary since it doesn't contain any powers of $y$ and doesn't contain $x$.
However, it does satisfy the second definition. If $ab$ is in $(x^2, xy)$, then $x$ divides one of $a$ or $b$, and then that element's square is in this ideal.
The ordinary definition links zero divisors to nilpotent elements. In the quotient of a ring by a primary ideal, the elements are divided into regular elements and nilpotent elements. Said another way, zero divisors are nilpotent in such a ring.
Another way to think about primary ideals is that the condition is one half of primeness. An ideal is prime iff it is radical and primary. (But actually, you could replace primary with your definition and that would still hold!)