A stack should only let the user be able to see the first item int the stack.
That's an ideal and that theory was maintain in Assembly.
but Java lets you search through the stack and see whats in the middle of it.
I think Sun MicroSystems added that feature ( can now access anywhere) for the programmer(implementor) to test if the exact value inserted on that stack are correct or if it is in correct order and able to predict what's the next value to be poped-up ( or the last value to be poped-up) and that is now the advantage.
And it is for debugging purposes only, other purpose makes the stack abused.