Yep, this is the correct answer! I was just writing up something similar, but you beat me to it. This is the expected behavior if the `data` variable has newlines between every word:
$ echo ${data}
testfile1 testfile2 testfile3 testfile4 testfile5 testfile6 testfile7 testfile8 testfile9 testfile10
$ echo "${data}"
testfile1
testfile2
testfile3
testfile4
testfile5
testfile6
testfile7
testfile8
testfile9
testfile10
$ echo "echo ${data}"
echo testfile1
testfile2
testfile3
testfile4
testfile5
testfile6
testfile7
testfile8
testfile9
testfile10