Elaborating on what @Dan mentioned in a comment, it is indeed a very common metaphor to depict the relationship between G-d and Israel as a relationship between a husband and his wife.
Indeed, in the Aseres haDibros (The 10 Commandments), the 2nd commandment on the first Tablet is idolatry, and the 2nd commandment on the 2nd Tablet is adultery.
There are, of course, more explicit connections - both in the prophets (the verse you quoted here, and in a different question of divorcein a different question of divorce, and the entire Shir haShirim [Song of Songs] is based on that allegory as well) and in Rabbinical literature, - Talmud and the midrashim.
It seems on a basec level, one of the reasons for the parallel is that both relationships are classically a model of giving and receiving, that is built on trust and experience, so the nature of the relationship is somewhat similar.
I am sure there are other deeper explanations, but I hope this is a good frist steip in your research.