Parashas Naso · Passuk 5:14
but a fit of jealousy has come over him and he is wrought up about the wife who has defiled herself; or if a fit of jealousy has come over him and he is wrought up about his wife although she has not defiled herself:
Chabad.org — English translation + Rashi
Source: Sotah 3a.
English: “And a spirit of jealousy passed over him” — it was taught: R’ Meir used to say: A person commits a transgression in secret, and the Holy One proclaims it about him in public.
In context: The public ordeal of the sotah is midrashically linked to the principle that hidden sin is ultimately exposed.
Custom
Chazal teach that secret sin is brought into the open; the jealousy-spirit initiates that exposure.