How did Atticus explain Bob Ewell's provocative behavior in To Kill a Mockingbird?(Chapters 23-25)Why do you think he told this to his children?
Bob Ewell is widely despised in Maycomb. Socially, he's regarded as being at the bottom of the pile, basically "white trash." Essentially, he's a nobody. The trial of Tom Robinson, however, gives him a chance to be somebody in town, to pose as a defender of the honor and integrity of white women, protecting them from sexually predatory black males.
But Atticus's comprehensive demolition of Bob's credibility on the witness stand completely ruins any chance of his becoming the local hero he would like to be. So, his subsequent vile act is a way of getting back at Atticus for wrecking his plan. Atticus, as always, tries to put himself in other people's shoes, even those who treat him so disrespectfully. And he passes on this extraordinary degree of empathy to his children at every available opportunity. He's trying to teach Scout and Jem valuable life lessons that he knows they'll need to learn. However badly people behave, they're still humans, and you need to regard them as such if you're ever going to understand them.
Atticus explains that Bob Ewell had little choice after he had been disgraced on the witness stand during the Tom Robinson trial.
"Jem, see if you can stand in Bob Ewell's shoes a minute. I destroyed his last shred of dignity at that trial, if he had any to begin with. The man had to have some kind of a comeback, his kind always does. So if spitting in my face and threatening me saved Mayella Ewell one extra beating, that's something I'll gladly take."
Atticus goes on to say that Bob has gotten it all out of his system and there is nothing else to worry about, hoping to erase any fears the children may have. It was typical of Atticus to treat everyone fairly--even someone like Bob--and he wanted his children to understand why Bob made the threats he did.
I think that the answer you are looking for in at the start of Chapter 23. There, Atticus says that the reason Bob Ewell is acting like this is that his pride and credibility has been destroyed by the trial. If he does not do something to fight back, he will lose respect for himself and maybe people will look down on him even more.
I think that Atticus says this for a couple of reasons. First, I think he wants the kids not to be afraid. Second, I think he wants them to see all people, even Ewell, as people who have valid and understandable feelings. He wants them to stand in the other person's shoes and understand their outlook.