Original question: If $I,J$ are ideals and $R$ is a PID why does $\,I+J=R\,\Rightarrow$ $\,IJ=I\cap J\,$?
Updated question: With same hypotheses, why does $IJ= I \cap J\,\Rightarrow$ $I+J=R$?
Original question: If $I,J$ are ideals and $R$ is a PID why does $\,I+J=R\,\Rightarrow$ $\,IJ=I\cap J\,$?
Updated question: With same hypotheses, why does $IJ= I \cap J\,\Rightarrow$ $I+J=R$?
Answer to the original posed question.
You don't need $R$ to be a PID.
In any ring, $IJ\subseteq I$ and $IJ\subseteq J$ (in fact, this holds if $I$ is a right ideal and $J$ is a left ideal); so $IJ\subseteq I\cap J$.
For the reverse inclusion, if $R$ has a unity and $JI\subseteq IJ$, then $$(I\cap J) = (I\cap J)R = (I\cap J)(I+J) = (I\cap J)I + (I\cap J)J \subseteq IJ + IJ = IJ.$$
The conclusion thus holds, in particular, whenever $R$ is commutative with $1$.
Answer to the new question.
The question has now been changed to asking a converse: why is it the case that if $IJ=I\cap J$, then $I+J=R$ (in a PID)?
In a PID, this comes down to the fact that the least common multiple equals the product exactly when you are in the relatively prime case.
Let $I+J = (k)$, and $I=(a)$, $J=(b)$. Write $a=kx$ and $b=ky$. Then $kxy\in (a)\cap (b)$, so $(kxy)\subseteq I\cap J = IJ = (ab)=(k^2xy)$. Therefore, $k^2xy|kxy$, so $k$ is a unit, hence $I+J=R$.
Added. The converse no longer holds for arbitrary commutative rings with $1$. For example, taking $S$ to be a nonsimple ring. and let $L$ be a nontrivial ideal of $S$. Let $R=S\times S$, $I=\{(\ell,0)\mid \ell\in L\}$ and $J=\{(0,\ell)\mid \ell\in L\}$. Then $I\cap J = \{(0,0)\} = IJ$, but $I+J = L\times L\neq R$.
Of course, the example above is not a domain. There are many domains in which the result does hold (e.g., Dedekind domains). But here's an example: take $R$ to be the ring of all algebraic integers, and let $I=J$ be the ideal generated by all $n$th roots of $2$, $$I = J = (2^{1/n}\colon n\in\mathbb{N}).$$ Since $2^{1/n} = 2^{1/2n}2^{1/2n}$, then $IJ=I=I\cap J$, but $I+J = I \neq R$.
It's $\, \color{#c00}{(i,j) = 1} \Rightarrow {\rm lcm}(i,j) = ij.\ $ Proof: $\ i,j\mid r \,\Rightarrow\, \overbrace{\color{#c00}i\mid\color{#c00} j\,(r/j)\, \Rightarrow\, i\mid r/j}^{\rm Euclid's\ Lemma}\, \Rightarrow\, ij\mid r$
Update: question changed to converse. It's probably simplest to use the general gcd * lcm law $\rm\ a\: b\ =\ gcd(a,b)\ lcm(a,b),\,$ which immediately yields both directions of your question - see the proof below. For more on the universal definitions of gcd, lcm employed below see here and here.
Theorem $\rm\;\; (a,b)\, =\, ab/[a,b] \;\;$ if $\rm\:[a,b] $ exists, $\:$ where $\rm\:[a,b]\:$ denotes $\rm\:lcm(a,b)\:.$
Proof: $\rm\quad\quad d\ |\ a,b \iff a,b\ |\ ab/d \iff [a,b]\ |\ ab/d \iff d\ |\ ab/[a,b]$
Corollary $\rm\ \ (a,b) = 1 \iff [a,b] = ab$