The quotation marks are a syntactic construct which denote a string literal. I.e. the parser knows that the characters between the quotations marks form the value of a string. That also means that they are not part of the value itself, they are only relevant for the parser.
Examples:
// string literal with value foo
"foo"
// the string **value** is assigned to the variable bar,
// i.e. the variables references a string with value foo
var bar = "foo";
// Here we have three strings:
// Two string literals with the value " (a quotation mark)
// One variable with the value foo
// The three string values are concatenated together and result in "foo",
// which is a different value than foo
var baz = "\"" + bar + "\"";
The last case is what you tried. It creates a string which literally contains quotation marks. It's equivalent to writing
"\"foo\""
which is clearly different than "foo"
.