This sentence sounds odd; "Do you have any foreign beer" would probably be more common. "a foreign beer" could be right in some situations, but unfortunately, there is no context given. A lack of context is one of the biggest problems with most of the phrases that appear on Duolingo.
Yes, you are absolutely right, but I think that they want to focus on "UNA birra". Like, sure, if you are translating this sentence for an article or whatever, you would want it to make sense, and be natural, so you would translate it to "do you have any foreign beer?" But I think that the reason they translate most sentences literally is so they can underline and focus on the sentence in ITALIAN per se, not the way it is used in English. Honestly, thus, I see the difference much more clearly.
The proper translation in English would absolutely be "do you have imported beer" or "any imported beer". No one ever says "foreign beer" in English! This exposes the limitations of this admittedly free website. But the point here is to learn how Italians say it, not how English speakers say it.
But since we're striving and also are obliged to make the only correct translation, even if, in this context, the literal sense is "foreign", at least "imported" needed to be added to the possible correct translations. I guess they should've know what translation actually means and how it functions.
There probably is a different word for imported and it probably wouldn't make too much sense in Italian. Remember it is our responsibility to interpret the translation to best suit the situation. "foreigner/foreign beer" can easily be readjusted to "imported beer", it just takes an extra second to recognize what either duo or the speaker is trying to convey.
I think the word "foreign" is used more and more often in a negative way in the UK. As in "I don't drink foreign beer, give me something British!" In a pub I would definitely recommend asking for either "imported beer" or being even more specific, eg "Do you have any German beer?" or "Do you have Peroni?"