Why do we have to use replace to insert newlines in repeaters?

Why is it exactly that we have to insert a newline character into repeater text with the .replace(**delimiter**,"\n") function? Like in a technical sense, I’m just trying to understand it.

If I put “\n” inside the repeater text it doesn’t work. I thought I’d be clever and tried .replace("\n","\n") to no avail. What is it that magically makes “\n” turn into a newline but only when replaced?