The Ammonite king must have been a fool to incite David’s anger as he did. You may recall that the Law forbade the Israelites from trimming their beards in the manner of the pagans around them; they took that seriously, and no one shaved. More importantly, the men of nations around them grew beards that they styled elaborately. Beards were a treasured mark of manhood to these people. That is why the men were so humiliated by having their beards cut off. It was an unmistakable insult to the ones who did the insulting as well as the ones who were insulted.
But it seems like the situation was from God, for it led to a great defeat of the Syrians and Ammonites in David’s defense against the aggressors. May God use the setbacks in our lives as He did in His Old Testament people’s lives!