Thereby means by that means, and as a result. The action was taken and this is what it achieved.
It is formal and legal in flavour, and it usually introduces a consequence in a participle clause, as in thereby avoiding the charge. It belongs to contracts, judgments and academic writing rather than speech. Its most famous use is entirely different, since thereby hangs a tale is a phrase from Shakespeare meaning there is a story attached to that, and it is the only place many people ever meet the word.
1adverbtherebyBy that means; with that result.
“He signed the form, thereby accepting the terms.”
Old English
ðǣrbig
Middle English
therby
English, today
thereby
From Middle English therby, from Old English ðǣrbig, equivalent to there + by. Compare the parallel formation of German dabei.
Etymology from Wiktionary, CC BY-SA