Used to emphasize the degree of an adjective or verb, similar to 非常に or とても, but with a slightly formal or literary feel. Often found in written language or polite speech.
意外にも explicitly means 'unexpectedly' and is more common in modern Japanese. ことのほか in this sense is rarer and more literary.
Etymology
Derived from こと (thing) + の (possessive particle) + ほか (other/outside), literally 'outside of the matter'. The adverbial meaning developed from the idea of being beyond the ordinary or expected.