As many languages, Korean spelling is sensitive to the integrity of words or part of words. In 감사합니다, 감사 is a word, and both 감 and 사 are meaningful syllables (corresponding to Chinese characters). The 하- part is also a word, a verb meaning "do", so that if you split the ㅎ "h" and the ㅏ "a", the integrity of the root is lost, right?
Same holds for 다, which you can find as an ending in many contexts. It wouldnt make much sense having *합닏-아 on the one hand and 한-다 on the other, because it s the same ending in both cases. Now there are rules of composition that forbid to have some sequences of letters within the same graphic syllable (for instance ㄴㄷ), because those sequences cannot be pronounced as one unit at the beginning or the end of a single syllable. This may explain some accomodations with the integrity principle...
The-s ame princip le-app ly to-oth er-lang uages-as well... ;-)