The author of that code is forcing
array[size - 1] = 0;
access to make sure that at least one access to the array buffer has been made prior to running the main part of his code. This is done to mitigate effects of using virtual memory swap file - that access increases the probability of the buffer not being swapped out to the paging file when the main code starts. Without this it could happen that when the first access to the buffer was made swapping would occur and that would increase the runtime significantly and lead to false meausurement results.
This will only have guaranteed effect if the buffer size is not greater than the size of the minimum memory segment the operating system uses for addressing virtual memory.
This is not a problem specific to C++.
Also vector is slower because accessing it requires two memory accesses - one to retrieve the buffer address, another one to actually access memory. With C array the buffer address is already known and only one access is needed. If the same code with vector is rewritten using a temporary for storing the buffer address it runs much faster.