I'd say it's because cap is a sub class of hat.
It's like if it asked for "car", you would not expect it to accept mini or taxi cab or jeep.
Thank you. I never know whether to report it when I'm marked wrong for a typo (especially when the sentence is given to me in audio form) because I don't know if what I typed is ANOTHER word in the language that I haven't learned yet. That was the case here (one "p" vs. two "p"s).