As I said about echo way back in my first response: the print command is what is turning the backslash-n sequences into newlines. If you use -r to turn off that behavior, you can see the strings unmangled:
The -r is telling print not to do something it normally does. The result is the raw string (which I think is what -r stands for).% print -r $gggabc\n \n def\n \n ghi\n
print '\n'
Then the string you create and pass to print has no newline in it. It is not one byte of value 10, but two bytes, one with value 92 (backslash) and the second with value 110 (lowercase n). The code implementing the print command recognizes this sequence as code for "print a newline", so it does. But that's the command doing that. The string itself has no newline in it.