How to disable loops from automatically wrapping non-marked up content?
Pretty sure that's just your browser's console trying to tidy things up when you inspect.

If you View Page Source, I'd guess it wouldn't be there.

I also just tested this with your example code on a fresh Craft 3 install on the latest Chrome and Firefox on Windows and the latest Safari on OSX and was not able to reproduce your picture.