The correct way to tell the compiler not to treat the string (or any local variable) as something which will persist only while the function has not yet returned to its caller is to use the static keyword
I know that. What puzzled me at first was that copy operation. But yeah, it makes sense, since the user is telling the compiler that he might write something like
local_string[4] = 'a';
and that can't happen if local_string points to the string literal's address.
If the variable was declared as const, i.e. "read-only", the compiler could figure a copy of the string was unnecessary, since the code would not change the string content in any way. What I'm curious about is how the output asm changes.