Yahweh, via Malachi, noted that Judah had not been faithful. There was an abomination in Jerusalem itself. Judah had profaned the sanctuary of Yahweh. Judah had married the daughter of a foreign god. Perhaps this indicates a non-Jewish woman. Thus, Yahweh was going to cut them off from the tents of Jacob. Anyone involved in any kind of false worship of a foreign god would be cut off from being a witness or bringing offerings to Yahweh. They should be excommunicated.
The Israelites were sacrificing to the various Canaanite gods on the tops of the mountains. They were making offerings on the hills. They preferred to make these offerings under the various trees, the oak, the poplar, and the terebinth, because the shade of those trees was good. Thus, their daughters became prostitutes, while their daughters-in-law committed adultery. Clearly, they were unfaithful to Yahweh.