According to this
The syntax for adding new elements to the page is easy, so it's tempting to forget that there's a huge performance cost for adding to the DOM repeatedly. If you're adding many elements to the same container, you'll want to concatenate all the HTML into a single string, and then append that string to the container instead of appending the elements one at a time. Use an array to gather all the pieces together, then join them into a single string for appending:
Why do we have to use an array? What's wrong with just repeatedly appending to a string directly? Isn't string concatination suppose to be faster than array join?