This is possible because Java VMs were written using non-portable knowledge of the memory models of the implementations of C++ that compiled them.
The introduction of a memory model into C++11 is useful since it provides a standard model, and so future C++ code does not need to rely on detailed knowledge of particular C++ implementations.