Same reason some use XML with their C++. You can make or use pre-existing HTML5 parser to make web pages and such for you game. EA's Sims series (at least in Sims 3) creates a folder after you make a character and start playing which ends up creating an XML/HTML files that end up having your character and other stats so you can view and share your information online if you like.
Have you never played with using C++ to output an HTML page, or XML, PHP?
Well I'm sure you can embed them if you want to use them as a scripting language (though you would have to do a lot behind the scenes in order to make that work), but I was referring to parsing. I wrote a game several months back that created a php page with the high scores in a format so I could upload them to a website, but never bothered getting a web host and have long since deleted the game.
As I said, Sims 3 creates a xml and html page that shows your character and some other stats for the character.
Why would you use HTML5? You must be thinking of web games...