It's not guaranteed. The standard headers *might* include other standard headers, but you cannot rely on this. On some compilers this code will not compile.
I found this question interesting, so I started searching in the deeper files of my compiler (mingw-g++). I had to go very deep before I found the anwser, but I found it. It works like this:
The iostream includes the istream.
The istream includes the ios.
The ios includes bits/ios_base.h
ios_base.h includes bits/locale_classes.h
locale_classes.h includes string
And string defines the std::string. So I guess this is how it works. I'm not 100% sure though, but it does look logical in some way.
Looking through string I find a lot of includes to other bits headers. So I guess the std::string is defined somewhere deeper in there.
Headers almost always include other headers, and most people know this. For example if you were designing a class that had a function taking a std::string parameter, in the class header you would have to include the string header.
Is this accidental, or is it just a hidden feature?
That depends on how you think about it.
Including the header <iostream> is required, by the C++ standard, to make the definition of the class std::basic_string<char> visible (although the requirement is somewhat obscure)
It does not require exposing the typedef std::string or any other part of the header <string> (such as std::getline or operator< for strings).