The idea of sailing the longer tack (or jibe) first seems so simple, but it's hard to over-estimate the value of this rule of thumb. When you're not sure what the wind will do next, your can increase your odds of success greatly by getting on the tack that takes you closer to the next mark.
The shorter tack takes you closer to the layline, and we know that is usually not a good place to be. By sailing the longer tack, you stay away from the laylines and closer to the middle of the course. This gives you many more options to handle unanticipated windshifts.
In the situation shown above: If the wind shifts left, the Green boat will benefit. If the wind goes right, the Green boat may fetch the mark and the Red boat will likely overstand. If the wind oscillates, the Green boat can be patient and pick the best time to tack. And the Green boat has more options for keeping her air clear as she sails to the mark.
It is more important to be on the longer tack when:
1) you are far from the mark. That's because the longer it takes you to get to the mark, the more likely there is to be a change in the wind. It's not so important to sail the longer tack when you get very close to the mark; at that point other things are more critical; and
2) the length of the tacks is very skewed. If you have seven minutes to sail on starboard tack and six minutes left on port tack, it is not so critical to be on starboard. But if you have nine minutes left on starboard and one on port, then it's very imprtant to sail the longer tack. It's simply a question of odds.
Of course, it doesn't always pay to sail the longer tack first. When you know there is better wind pressure in the direction of the shorter tack, for example, you should go for it. But when you're not sure what will happen with the wind, play the odds by sailing on the tack where your bow is pointing closer to the next mark.