When you pass an array to a function, C++ doesn't copy it. Instead, it passes a pointer to the first element. This is efficient for large arrays but has consequences notice that. The function receives the memory address where your array starts.
It can access and modify elements just like the calling code. Changes inside the function affect the original array. This differs from simple types like int, which are copied. Arrays pass by pointer for efficiency.
Copying thousands of elements would be slow. But functions can accidentally modify your data.