One of the goals of an optimizer is to let the programmer write code
that runs well on a variety of machines. Writing around the machine
architecture should be avoided where possible because (a) it is extra
work for the programmer during creation, debugging, tuning and
maintainance and (b) because code that is hand-optimized for one
machine is often hand-pessimized for another.

Except for assembly, it's also the case that some optimizations cannot
be expressed in the source language.

How much work is worth how much potential gain? For me to try
optimizations by hand requires substantial effort. It may have zero
payoff. Some optimizations may even conflict with each other. The
optimizer just goes ahead and tries.

There's also the issue of dusty decks; I'll ignore that for this
discussion.