Why does cable routing utilize alternation of sections of shielded and unshielded cable? Why do manufacturers do this? What's even more interesting, many a bike have the middle cable fully housed, while the other two are "interrupted" as shown above.

IMHO those are the pros and cons of interrupting cable housing:

Advantages:


lighter


Disadvantages:


more complicated to cut to length and install
more friction as there are a lot of enter/exit points for the cable into the housing
far more susceptible to dirt and water
more expensive, because of end caps and labor cost.


As is evident, in my opinion, all cables should have uninterrupted housing. However, all kinds of bikes in all price ranges have these intermissions - on the top tube, bottom tube, seatstay (for the RD). And it is not a factor of weight, as 10-year old massive steel frames also utilize it.

There must be an explanation. But what is it?
It's not a given that the full-length housing is lower friction.  I suspect that a well-done exposed cable scheme is lower friction than a full housing.
Especially for indexed shifters, the cable housing changes effective length with tension and temperature changes.  The exposed cable scheme has much less flex and hence more precision shifting.
The full-length housing is ugly!


I haven't looked at new bikes much in about 5 years, but prior to that the full-length housing was almost exclusively seen on inexpensive bikes, while the exposed cable was common on the more expensive ones.  This strongly suggests that cost is not a reason for exposed cables.  (And reason also suggests this -- the housing is cheaper than the housing ends, eg.)

Of course, full-length housings are more compatible with suspension bikes, and probably have some advantages on true off-road bikes.  So you'll see full-length housings more and more on bikes in that spectrum.