Yahweh asks the rhetorical question in order to rebuke Jerusalem. It can be translated as a statement. Alternate translation: "Your heart must be very weak ... that you would do all these things, deeds of a shameless prostitute!" (See: [[rc://en/ta/man/jit/figs-rquestion]])
Here the word "heart" represents the will and emotions. Yahweh speaks of her inability to control her desires as if her heart were weak. Alternate translation: "How weak-willed are you" (See: [[rc://en/ta/man/jit/figs-metonymy]] and [[rc://en/ta/man/jit/figs-metaphor]])