string literals are necessarily null-terminated, so it makes sense to provide a c_str() method to treat it as a null terminated string.
In practice this arises because you might imagine a global table that contains option names which you want to pass to something like getopt_long_only, but in other situations you might want to do some comparisons on the option name (for example, is --foo in the options table), where you want to make use of StringRef comparison operators. Of course, there are tons of other system calls or library calls which we don't have control over that take const char* and where we pull arguments for these functiosn from a global table of const char *, so this doesn't seem like just a one-off case.
Writing .str().c_str() for these cases is problematic since it means we cannot assume the storage will live longer than the current statement, plus it's just inefficient since we're unnecessarily incurring a copy.