C++ (like plain C) does not check array bounds. This program references the array far out of bounds, but it does not throw any exception. What it does is attempt to complete the subscripting operations where the subscript specifies, a location outside the array. The actual results of this madness will vary with the compiler and operating system which gets to perform them.
One of the primary design goals of C is efficiency. Checking the bounds takes time, so we're not going to do it for you. If you need to check them, either checks yourself or use the at method (see below).
Always be very careful about bounds-checking arrays in C++. The results of errors can be quite obscure and difficult to debug.