Atticus was more surprised than anyone present when Sheriff Tate reported that Bob Ewell was responsible for the attack on Jem and Scout. Atticus never actually expected Ewell to harm his children; however, he figured Ewell might eventually come looking for him. He knew that Ewell was unpredictable and full of hate. And more than that,
"He was out of his mind," said Atticus.
Sheriff Tate thought differently, calling Ewell a "low-down skunk."
Atticus shook his head. "I still can't conveive of a man who'd--"
"... I thought he got it all out of him the day he threatened me. Even if he hadn't, I thought he'd come after me."
Sheriff Tate was certainly more accurate about Ewell's character. Atticus, as usual, was willing to look on the good side of human kind, thinking even Bob Ewell wasn't evil enough to attack children.
Heck Tate is checking out Scout's costume during his investigation after the attack. He sees the wire mesh on Scout's costume. It had been sliced. He shows it to Atticus and explains that it probably was what had saved her life. He tells him that Mr. Ewell had meant to harm the children.
Atticus makes the statement that Mr. Ewell was just out of his head.
Heck Tate responds by contradicting Atticus and explaining that the man was a mean drunk and he was only brave enough to hurt a child. Following the trial Mr. Ewell had threatened Atticus, but instead he had gone after the children. This notion is very hard for Atticus to understand as he has always tried to look for the best in people.