Chrome sets it if you tell it you want to use its spellchecker with some languages.
I'm not sure what the standard says, but i suspect you'd surprise users considerably less if you used the first language listed in that header rather than the last (assuming equal or missing q values).
Yeah you're parser is too broken to be useful. For example with this header, listing English and French in that order, even explicitly indicating a bad quality value for French:
(It's only a naive implementation of parsing the Accept-Language header. Sorry, was all I could do at the time.)