Your final sentence leads me to hope that your tongue was fairly firmly in you cheek when writing this contribution, as otherwise, you are going to have real trouble dealing with reality.
Your first two paragraphs I can accept as true, as far as they go, and I can accept in the widest sense that paragraph 3 is true, but I can't accept its relevance to the reasons that OS's have such huge flaws. To expect a product to be well-designed, thoroughly tested and fit for purpose is not the same as demanding perfection.
As a Chartered Engineer of some 35 years experience, including protyping some of the earliest processor controlled systems, but also having dealt with full "nuts, bolts, transistors and capacitors" engineering, I can advise that the level of badly designed, inadequately tested and unfit for purpose products generated by the software community as a whole, and the OS producers in particular can not be matched in any other branch of engineering.
If any other type of product were sold with such blatant non-compliance with the claims made for it, and so unfit for purpose, trading standards authorities and courts of law would support consumers not only in demanding complete refunds, but in claims for consequential damages.
As for your meander into the theories about patterns (not laws) of the Universe, this contains nothing of any relevance whatsoever. With regard to this "law" of decreasing energy in a continually expanding open system, the production of a product that delivers to specification, matches its marketing hype, and which is fit for purpose has nothing whatsoever to do with available energy, decreasing or otherwise, but is completely down to thoroughness, committment and honesty.
Your analogy between machinery breaking down and errors in programmes is utterly invalid. The former results from wear and tear, overload or error in use, amongst other contributory causes. Computer code has no capacity to suffer from wear and tear, and in the case of OS's is self-defining in its load and correct usage. Admittedly the hardware can be insufficient for the load placed on it, but that is another matter altogether.
Errors are caused only by human error or negligence, and of course, that is where your original statement about human imperfection is relevant, but this is why, in all other branches of design, prototyping, testing, etc., so much emphasis is placed on suitable and sufficient testing, together with multiple layers of safeguard. Much of my career was associated with systems to ensure safety in transport systems, and the possibility for error will have multiple safeguard layers in use to ensure that it can only cause failure when each of the multiple layers have not performed to the required level. Probability dictates that, in such circumstances, this is of such a low probability as to be acceptable - absolute perfection being impossible as you rightly say.
The numerous bugs that either take so very long to iron out, or never get ironed out at all, in these OS's are far too prevalant to fit the category of low probability. Hence, the simple fact is that the systems have been under-designed and under-tested.
If you want to consider the true "why?" for this question, this comes from the combination of:
>Trying to be too ambitious, responding to the pressure placed by the consumer and applications designers to achieve more than the state of the art is ready for. They have not learnt the less of other branches of engineering to exercise restraint in trying to achieve the all-singing, all-dancing, adjusting their customers' expectations to a level that can be met with confidence in its performance. Engineers are often considered to be negative, placing obstacles in the way, but in fact they are exercising their professionalism in protecting the customer from the effects of over-ambition.
>The desire/demand to achieve huge financial returns sooner rather than later, at the lowest cost possible, leading to inadequate time spent on either design or testing.
>A complete lack of care for their end-customers, engendered by the lack of genuine competition.
>The fact that we have all come to accept that computer systems appear to be exempt from the simple trading rules that apply to all other products.
Now I've pontificated at great length, but at least I believe it has far higher relevance and accuracy, even though it does not solve the problem.