Yahweh explains why he is doing this (Jer 9:13-9:14)

“Yahweh says.

‘They have forsaken my law

That I set before them.

They have not obeyed my voice.

They have not walked in accordance with it.

But they have stubbornly followed

Their own hearts.

They have gone after the Baals,

As their ancestors taught them.”

Yahweh explains why this punishment was about to take place. They simply have forsaken the law of Yahweh that he set before them. They have not obeyed his voice. They have not walked according to his ways. They have stubbornly followed their own hearts. They went to the pagan idol gods of Baal, like their ancestors. Yahweh clearly explained his reasoning.