Unfortunately C++ is full of very dubious features that I argue may not make much sense or may make sense in a different form that's not how C++ implements them.
Except it still drags unsafe legacy APIs into the future as part of its core library. std::env for example isn't some safe take on how to deal with a system provided program environment in a modern multithreaded language, it is a thin wrapper around an ancient C POSIX API that is not threadsafe and cannot be fixed.