One thing Frank B talks about in High Performance Sailing is "modes." There are three basic modes of sailing: underpowered, adequately powered, and overpowered. When underpowered, the sails need to be tuned to maximize lift, which pulls the boat forward most effectively. The extra drag that goes with it is not important (or not so important) because we need full sails that give lots of power to accelerate and move quickly in light air.
When the power is adequate to power a boat at hull speed, the situation changes a lot. To go upwind in this situation, the sails need to be set for maximum efficiency, or max lift/drag ratio. To get there, we pull on some vang, flatten the jib some with halyard, apply some cunningham and outhaul to the main. Twist is not needed, and the jib should flow as smoothly around the back side of the main as possible. Efficiency means smooth airflow, sticking to the sail as much as possible.
Of course each of these three modes are subdivided further. Underpowered goes down to "drifting" where you heel the boat like crazy just to get the sails to hang in a sail shape. We do this so that when some air does start moving, it moves the boat in the desired direction. Then as wind picks up to 2-4 kt, you set the sails for maximum fullness with lots of twist and flatten the hull out, maybe heeling a few degrees to leeward to help the sails keep their shape and give some weather helm. Twist is needed because the apparent wind is more forward at the bottom of the sail than at the top. Why? The wind at the top of the sail is stronger than that at the bottom of the sail, and so the boat's forward motion affects the low, weaker wind more than the stronger, higher wind.