Why would anyone prefer this over Handlebars or any other templating language loaded in via separate files over Ajax, which is much nicer on the eyes? This just seems to me like it can get very complex and spaghetti-like very easily.
I haven't, but just did. It's pretty much the same in that you create inline HTML in Javascript. I'm not saying this is wrong. I'm just wondering why would someone prefer this method to a file-based templates (like Handlebars).