Why would Underwood, who hates Negroes, protect Atticus from a mob that wants to lynch Robinson?
While the answer to what motivates Mr. Underwood in Chapter 15 of To Kill a Mockingbird to defend Atticus from his The Maycomb Tribune office window other than to protect an upright citizen of Maycomb from physical harm is not evident, more explanation to Mr. Underwood's thinking comes through his editorial which follows "The Colored News" of the town's newspaper. In Chapter 25, Mr. Underwood, Scout narrates, is "at his most bitter."
In his vituperative editorial, Mr. Underwood expresses his belief, one that coincides with that of Atticus Finch, that
it is a sin to kill cripples, be they standing, sitting, or escaping. He likened Tom's death to the senseless slaughter of songbirds by hunters and children, and Maycomb thought he was trying to write an eitorial poetical enough to be reprinted in The Montgomery Advertiser.
By pondering the meaning of Mr. Underwood's words along with what she has witnessed at Tom's trial, Scout deduces that Mr. Underwood's words are a scathing attack upon the "secret courts of men's hearts" that condemned Tom: "Tom was a dead man the minute that Mayella Ewell opened her mouth and screamed." After the shooting of poor Tom Robinson, Mr. Underwood has perceived the darkness of racial prejudice, a bias that supercedes all rationality, all morality, all fairness, and all justice.