In one of the Hornblower books,
"We're weathering on her" said Hornblower; his eye was aching with staring through the glass, and his arms even were weary with holding the telescope to his eye, but in the excitement of the chase he could not relax.
"Not as much as I'd like" growled Bolton.
"Hands to the mainbrace!" roared Pellew at that moment.
It was a matter of the most vital concern to trim the sails so as to lie as close as possible to the wind; a hundred yards gained to windward would count as much as a mile gained in a stern chase. Pellew was looking up at the sails, back at the fleeting wake, across at the French ship, gauging the strength of the wind, estimating the strain on the rigging, doing everything that a lifetime of experience could suggest to close the gap between the two ships. Pellew's next order sent all hands to run out the guns on the weather side; that would in part counteract the heel and give the Indefatigable more grip upon the water.
Source Emphasis mine.
Why is the distance gained to windward so important in this type of situation?