The main reason to write it into the HTML was to be more maintainable, by putting the presentation in the HTML presentation layer. Most libraries, such as rivets do very similar things for very similar reasons. When I know there's a data formatting issue in 1 element in the HTML, I can just fix that in the HTML. I don't need to go into the javascript and find which jquery snippet changes that HTML element and does the formatting.