In what kind of rings a divisor of a product is a product of divisors?

Such rings are known as pre-Schreier rings. The property easily yields that atoms (irreducibles) are prime, so it is equivalent to being a UFD in atomic domains (nonzero nonunits factor into atoms), but is weaker in absence of that. Below is a summary of related properties of domains.

PID: $\ \ $ every ideal is principal

Bezout: $\ \ $ every ideal (a,b) is principal

GCD: $\ \ $ (x,y) := gcd(x,y) exists for all x,y

SCH: $\ \ $ Schreier = pre-Schreier & integrally closed

SCH0: $\ \ $ pre-Schreier: a|bc $\, \Rightarrow\, $ a = BC, B|b, C|c

D: $\ \ $ (a,b) = 1 & a|bc $\,\Rightarrow\,$ a|c

PP: $\ \ $ (a,b) = (a,c) = 1 $\,\Rightarrow\,$ (a,bc) = 1

GL: $\ \ $ Gauss Lemma: product of primitive polys is primitive

GL2: $\ \ $ Gauss Lemma holds for all polys of degree 1

AP: $\ \ $ atoms are prime [AP = PP restricted to atomic a]

enter image description here

Since atomic & AP $\,\Rightarrow\,$ UFD, reversing the above UFD $\,\Rightarrow\,$ AP path shows that in atomic domains all these properties (except PID, Bezout) collapse, becoming all equivalent to UFD.

There are also many properties known equivalent to D, e.g.

[a] $\ \ $ (a,b) = 1 $\,\Rightarrow\,$ a|bc $\,\Rightarrow\,$ a|c

[b] $\ \ $ (a,b) = 1 $\,\Rightarrow\,$ a,b|c $\,\Rightarrow\,$ ab|c

[c] $\ \ $ (a,b) = 1 $\,\Rightarrow\,$ (a)/\(b) = (ab)

[d] $\ \ $ (a,b) exists $\,\Rightarrow\,$ lcm(a,b) exists

[e] $\ \ $ a + b X irreducible $\,\Rightarrow\,$ prime for b $\ne$ 0 (deg = 1)

You can find proofs of most of the above (including counterexamples for implication reversals) by looking up papers by D. Anderson and M. Zafrullah with the keywords "Schreier" and "Gauss's Lemma". See also this answer for links on related topics such as the classical Euler four number theorem (Vierzahlensatz), Riesz interpolation, etc.