The timing has to do with both your code and how JavaScript is compiled. The differences are pretty inconsequential in this example though, so testing which is faster varies each time the code is run and the results are pretty indeterministic. Generally, they should take about the same time or ever so slightly faster or slower.
Your code
Your while loop will continue simply because you have the condition set to always be true. You didn't include a condition to check if it should stop at any point after each iteration is complete.
Your for loop on the other hand has a condition that is checked every single time an iteration is complete (checking if i < arr.length still).
Other than that, your code is pretty much the same. They both have the same block of code, the difference is that the while loop increments i inside its code block, rather than like the for loop that increments i after its inner code block.
The differences in this case are pretty inconsequential.
Compilation
If you've ever studied some assembly code, you should be a little familiar with some of the structures for loops.
Depending on how the code is compiled determines which operations/instructions are run in what order. Also, the structure for a while loop should usually be different from a for loop in assembly, meaning that there may be an extra instruction to run in a for loop versus a while loop or vice versa depending on the programming language.