Because it's not "kapelusz".
It beats me why English would use the word "hat" for things that are so different, but Polish "kapelusz" definitely has a brim, it's not a cap.
"hat" should not be wrong. there is no reason to use an article when translating one word.
There are often multiple exercises which use the same text and are linked to the same comment thread.
If kapelusz means a hat with a brim, then shouldn't "brimmed hat" or "a brimmed hat" be accepted?