"exceed in any excess of evil," from Shakespeare's it out-Herods Herod in Hamlet's instruction to the players in "Hamlet" Act III, Scene II. Shakespeare used the same construction elsewhere ("All's Well that Ends Well" has out-villain'd villany). The phrase reflects the image of Herod as stock braggart and bully in old religious drama. The form of the phrase was widely imitated 19c. and extended to any excessive behavior.
Oh, it offends me to the soul to hear a robustious periwig-pated fellow tear a passion to tatters, to very rags, to split the ears of the groundlings, who for the most part are capable of nothing but inexplicable dumb-shows and noise: I would have such a fellow whipped for o'erdoing Termagant; it out-herods Herod: pray you, avoid it. ["Hamlet"]
early 14c., "to value, assess," from Anglo-French estendre (late 13c.), Old French estendre "stretch out, extend, increase," transitive and intransitive (Modern French étendre), from Latin extendere "stretch out, spread out; increase, enlarge, prolong, continue," from ex "out" (see ex-) + tendere "to stretch," from PIE root *ten- "to stretch."
Original sense in English is obsolete. From late 14c. as "lengthen or extend in time," also "straighten" (an arm, wing. etc.). Meaning "make longer and/or broader in space" is from early 15c., as is intransitive sense of "cover an area, have a certain extent in space;" sense of "expand, grow distended" is from 1753. Related: Extended; extending.
also distension, "act of distending; state of being distended," early 15c., distensioun, from Latin distensionem/distentionem (nominative distensio/distentio), noun of action from past participle stem of distendere "to swell or stretch out, extend," from dis- "apart" (see dis-) + tendere "to stretch," from PIE root *ten- "to stretch."
"spatial extension; an uninterrupted stretch or area, especially one of considerable extent," 1660s, from Latin expansum, noun use of neuter of expansus, past participle of expandere "to spread out, unfold, expand," from ex "out" (see ex-) + pandere "to spread, stretch" (from nasalized form of PIE root *pete- "to spread").
1799, of the neck, "to stretch or be stretched out," from crane (n.). As "to stretch or bend the neck," 1849. Earliest sense (1560s) is "to hoist with a crane." Related: Craned; craning.