How is the meaning of 不得已 formed?
the usage is classical and shows up at least as far back as mencius: 吾豈好辨哉？吾不得已也。Here the meaning is quite literally "I cannot (不) achieve/obtain (得) an end (已)" to my argumentativeness. In other words, i have no choice but to argue. You might compare it with the much more colloquial 不得不.

By the way be careful about the whole multi-character words thing. Some (not I) would insist that they are mere syllables, the characters accidental byproducts of the spoken language. Better comparison would be with a language composed entirely of words like "counterproductive".