Let $K$ be a number field, $\mathcal{O}_K$ its ring of integers and $S$ a
subset of the real places. Let $\mathfrak{m} \subset \mathcal{O}_K$ an ideal. The ideal
theoretic
*ray class group* of $\mathfrak{m} $ and $S$ is the quotient group

$$ I^{\mathfrak{m}}/P^{\mathfrak{m}} $$

where $ I^{\mathfrak{m}} $ is the group of fractional ideals co-prime to $ \mathfrak{m} $, and the "ray" $ P^{\mathfrak{m}}$ is the group consisting of all principal ideals in the ring of integers of $K$ having the form $( \alpha)$ where $ \alpha $ is multiplicatively congruent to $ 1 \operatorname{ mod } \mathfrak{m}$ such that $\alpha $ are positive at the places of $S$.

Could somebody explain the original motivation for imposing for elements of the "ray" $ P^{\mathfrak{m}}$ this rather exotic congruence condition for the elements $\alpha $ to be congruent to $ 1 \operatorname{ mod } \mathfrak{m}$?

I suppose that the name "ray" came from the assumption that these in addition should be
positive at the real places of $S$. This suggests these "behave" similar like the
positive reals $\mathbb{R}_{ \ge 0 }$, which can visualized geometrically as a "ray". I noticed that in this discussion the reason for the name "ray" was discussed, but that doesn't exactly address my issue, since as far as I understood the punch lines from there correctly, the name "ray" based on the positivity assumption for *real places*.

But I would like to understand the reason for the condition $ 1 \operatorname{ mod } \mathfrak{m}$ for *finite places/ primes*, which looks very obscure to me
and seemingly falls unexpectedly from the sky.