However, some software has kludginess that is difficult to conceal, notably software that other software depends heavily on, like operating-system software. I will now discuss an example I am rather familiar with.
The Macintosh Operating System was introduced by Apple in 1984, as the OS of its initial Macintosh model. It had taken some heroic software engineering to get an OS and a GUI shell inside of 128K of RAM with room to spare for application software, so the MacOS design team made several compromises.
* A very small screen with only 1-bit color depth. Thus, each byte contained 8 pixels.
* Single-tasking. This made it easier to fit apps into that small memory, and it also simplified OS design -- there was no need to keep apps from stepping on each other's toes.
* A single memory space with real-mode memory. There was no point in supporting multiple memory spaces, and for virtual memory, the original MacOS used an ingenious hack: the filesystem not only included a Unix-like "data fork", but also a mini-database "resource fork", which includes code segments, GUI-widget definitions, etc.
However, the Macintosh line was successful enough for Apple to continue with it, adding more RAM and faster CPU's, and ultimately improving the MacOS.
By the late 1980's, Apple had introduced the MultiFinder, which was capable of running several apps at once -- and keep running as they were running. However, there was a certain difficulty: the OS had no way to keep those apps from stepping on each other's toes, so Apple's programmers implemented cooperative multitasking -- apps only get interrupted at "safe" times. Preemptive multitasking was limited to device-driver tasks and the like, and they could not do anything "unsafe", like allocate memory or do GUI stuff.
And though virtual memory was added at that time, the MacOS continued to support only one memory space. More than one would have required creating big shared blocks that essentially defeat the purpose of multiple memory spaces.
The move from 1-bit color to 8-bit indexed color to 32-bit full color was, by comparison, relatively easy. The original graphics API, QuickDraw, was still functional; Apple simply added some API feeatures for handling color tables and full color. And moving to larger screen sizes, and even multi-monitor support, was also easy.
Moving onward, in the mid-1990's, Apple tried to create an improved version of the MacOS called "Copland". It had a new OS kernel, one which supported preemptive multitasking and multiple memory spaces. However, that did not fit in very well with the existing MacOS, so it was to be confined in a single memory space, the "Blue Box", and run as a single app, with existing-MacOS apps being sub-apps of it.
Copland failed because of grotesque feature creep and some awkward features that were difficult to get working properly, but that's mostly another story. One of those awkward features, however, was its way of handling a new GUI-widget set that Apple had devised. These were to live in the Blue Box, and Apple's old GUI widgets were to be implemented in terms of them. That was rather difficult to get working properly, especially when some apps had manipulated GUI-widget internals.
The "Blue Box" approach to running the MacOS inside of another OS was to be adopted by some amateur programmers, who created apps that enabled the MacOS to be run inside of various other OSes, like the AmigaOS, the BeOS, and Linux -- apps called "Basilisk", "ShapeShifter", "SheepShaver", and "Mac-on-Linux".
Apple's acquisition of NeXT allowed it to succeed with MacOS X where it had failed with Copland -- and it supports the "Classic" MacOS in exactly that Blue-Box fashion.
But many of Apple's developers were reluctant to do all the rewriting necessary to get from the old MacOS to the NeXTian app framework renamed Cocoa. So Apple's programmers thought of a halfway house called "Carbon". Many of the old MacOS GUI widgets and other API features would still be supported in Carbon, but not all of them, and a Carbon app would have its own memory space and not have to live in Classic's Blue Box.
One can point to other examples of OS kludginess, notably DOS and the various flavors of Windows, but I am not as familiar with those, and I'm not sure I'd want to be.