This gives the tag function a way to access the interpolated values themselves, before they get coerced to a String. You're correct, though, that it really doesn't make much of a difference for a dedent function.
It is actually important for a dedent function when the interpolands contain newlines. Consider this example:
function fmt(q, a) {
return dedent`\
Question: ${q}
Answer: ${a}
`;
}
Since `dedent` is basically syntactic sugar for developer convenience, we want this function to be equivalent to this:
function fmtDesugared(q, a) {
return `Question: ${q}\nAnswer: ${a}\n`;
}
Now consider this input:
console.log(fmt("a\nb", "c\nd"));
// should print:
Question: a
b
Answer: c
d
But if `dedent` only got to see the string after interpolation—like this—
function fmtWrong(q, a) {
return dedent(`\
Question: ${q}
Answer: ${a}
`);
}
then the input to `dedent` would be
Question: a
b
Answer: c
d
and so `dedent` would not strip any indentation. That is, `dedent` is meant to identify the maximal common leading indentation in the template as written by the developer, which should not depend on the values of the interpolands.