My suspicion is that it was in an early draft, and got picked up by Blish in one of his adaptations.
I know I've never heard it, and I just rewatched "Day of the Dove" and "Errand of Mercy" on DVD not too long ago.
The First Draft script for "Day of the Dove" by Jerome Bixby (dated August 9, 1968) has the relevant dialogue from Dr. McCoy.
After Kang and Mara and the rest of the Klingons are taken from the transporter room, Kirk, Spock, McCoy, and Chekov also leave the transporter room, chatting while walking down the corridor and then continuing their conversation in the turbo-lift.
SCENE 26 INT. LIFT - FOUR
Doors close -- lift starts motion.
McCOY
(sour)
Fifty years -- eyeball to eyeball
with the Klingon Empire. They've
spied -- raided our outposts --
pirated merchant lanes. A thousand
provocations, and the Federation
has always managed to avoid war.
Now, this crazy business could
pull the trigger!
SPOCK
Our log-tapes will indicate our
innocence in the matter.
Unfortunately, there is no
guarantee they will be believed.
KIRK
One party -- with violent ideas
-- and the willingness to defend
them to someone else's death.
(pointed)
The essence of war, Mister Chekov
...and of prejudice.
Chekov's expression is stubbornly unrelenting.
**********
The line doesn't survive in the final episode--and McCoy's dialogue in Scene 26 in the turbo-lift as ultimately shot doesn't have any cutaways. So it's not like the line was filmed but then trimmed out somehow at some point.
I think it's this line that survives in James Blish's adaptation of the episode in the
Star Trek 11 book that people "heard" in their imaginations while reading.
I don't know how canon to consider early drafts of scripts. But it's not like the "50 years of conflict with the Klingons" notion is purely mythical.