Nubby question about "For loop"

Sorry for my dummy question, but I can’t understand why we should use other variable (longestWord)
in this example:

function findLongestWord(str) {
  var array = str.split (" ");
  var longestWord = 0;
  for (var i = 0; i<array.length; i++)
  if (longestWord < array[i].length)
    {
      longestWord = array[i].length;
    }
  return longestWord;
}

findLongestWord("The quick brown fox jumped over the lazy dog");

and what is the logic? if longest word is smaller than length of my array, so make longest word equal to array element!?!?
WTF??

Thanks to everybody for your answers!

Where var “longestWord” contain the value of the max num?
longestWord = 0
and after all we assign the value of array[i].length to this variable, but it doesn’t mean that it’s the longest value…

Perfect explanation!
Thank you very much for your help!