When you refer to a variable without quotes around it (e.g.
echo $files), the shell splits the value apart on whitespace and passes each term as a separate command-line option. Newlines are treated the same as any other whitespace. The
echo program doesn't see the newline characters at all; it just gets an array of strings, each of which is a single filename.
When you refer to a variable in quotes (e.g.
echo "$files"), the shell doesn't do any whitespace splitting; instead, it passes the entire value, unmodified, as a single argument. The
echo program receives one long string that includes the newline characters.
Variables aside, this is the same behavior you get with quotes around literal values. If you write
echo foo bar, the spaces are stripped out by the shell and
echo just gets the strings
bar, and it'll print those strings with a single space between them, since that's how it's coded to combine multiple arguments. If you write
echo "foo bar",
echo gets the single string
foo bar and will print it as-is.