Because a lot of JS developers have traditionally manipulated strings of HTML, which have standardised on double quotes for attributes.<p>Also, straight quotes as punctuation are ugly; ‘ and ’ look much nicer.