they're in the array so they can be dynamically generated by the script, instead of pissing them static into the markup where in a production site they'd be a waste of bandwidth for non-scripting users and confusing crap for some screen-readers/braille readers.
Remember, HTML is for MORE than just sighted users with the scripttardery, and scripting only elements can wreak havoc for screen/braille reader software which is why so many websites are broken useless messes just BEGGING To get their asses sued off.
Don't believe me? Ask Dominos and Beyonce. Broken artsy-fartsy "designer" crap knee deep in inaccessible scripttardery, that got them dragged into court.
The Supreme Court telling Dominos to go suck an egg, and setting a rather scary precedent.