Think of the word as a small cloud that has to settle somewhere in the sentence. Put it next to the verb and it settles on the person doing the action: they speak, look or sit with that cloud over them. Move it to the front of the sentence and add a , and the cloud floats over the whole thing instead, so it is the writer who is sorry, not anyone in the story. Same word, same feeling; what changes is where it lands.
From the word’s history
Our Wiktionary evidence gives unhappily as Middle English unhappily, equivalent to un- plus happily, or unhappy plus -ly. So the word is simply happily turned over, and nothing in the packet says more than that.
手上的 Wiktionary 資料說 unhappily 來自中古英語,等於 un-(不)加 happily,或是 unhappy 加 -ly。所以它就是把 happily 整個反過來。資料只說到這裡,再多的來源故事我們沒有依據。
Wiktionary via supplied kaikki extract 3f6f69a190036ae4, entry 'unhappily' (adv), etymology_text
登入就可以看每一支怎麼連回核心畫面。