The prophet Malachi indicted God’s people with some amazing words: “Ye have wearied the LORD with your words. Yet ye say, ‘Wherein have we wearied Him?’ When ye say, ‘Every one that doeth evil is good in the sight of the LORD, and He delighteth in them’; or, ‘Where is the God of judgment?'” (Mal. 2:17). Craig A. Blaising comments,
The Jews in Malachi’s day had failed to learn such hope [of God’s future punishment of evil people and rewarding of the righteous when He comes] from the Scriptures. They questioned God’s justice by saying that He delights in evil people and by asking, Where is the God of justice? Yet they were the guilty ones; they were the ones who were unfaithful to Him. Here too God responded by referring to His forthcoming judgment (Mal. 3:1-5). However, unlike the answers by the righteous biblical writers mentioned earlier [Job 24, 27; Ps. 73; Eccl. 8; Jer. 12; Hab. 2-3; mentioned in the previous paragraph in the commentary], the judgment which Malachi referred to was to be against the hypocritical questioners as well.
—BKC: OT, 1583; bold and italics in the quote are from the original
When we are tempted to question God’s justice, we would do well to allow this indictment (2:17) and God’s response to the people’s questioning His justice (3:1-5) to turn us away from yielding to the temptation to do so.