We, meaning the wide body of Duo students, need two spellings for one word because some words in the English language have two widely used and accepted spellings.
Since Duo accepts either one it is not an issue. You are free to use either one as are all the other students who choose their preferred writing and speaking style.
You may be interested to know that Dr. Samuel Johnson believed that gray should be the correct spelling. Almost all English dictionaries from the time took his lead in this matter as well as most others. The Americans seized on the new concept of widespread dictionaries from England and distributed some throughout their country to cope with the increasing variety of spellings cropping up on their frontiers. Relying on Britishers such a Dr. Johnson resulted in the a spelling spread throughout the continent.
The British writers and elites, on the other hand, ignored the attempt at standardization and stuck with their identification with customs of their earlier French rulers and retained the spelling with an e popularized by a widespread French language romantic poem.
So... the spelling with a is the one prescribed by the legendary British lexicographer and associated dictionaries as being the English spelling. But the British bourgeoisie wanted to keep their affected speech style with its faux French manner of spelling to show their position in the English class system. Not for them the spelling recommended for English commoners. The reluctance of the leading academics to yield a symbol of their membership in the upper classes resulted in the grey spelling persisting and eventually becoming the standard version in the U.K.
To the very limited extent that a program such as Duolingo can be regarded as having a national origin or flavor, Duo is American.
Because you read a sentence that says "gray" instead of "grey" is not an error nor is it an indictment of UK spelling. It just happens that both BrE and AmE spellings are equally accepted. This is true for all English words which have spelling variations (color/colour, etc). When you log onto Duolingo, you are no longer in the UK. You are in Duolingo's world, where AmE speakers acknowledge BrE usage and hopefully vice versa.