In some places, a reason is required
Waay back, 30+ years ago when I lived in NYS, for the permit you had to fill in a reason. "Hunting and sporting" was acceptable to some judges (who sign the permit, and ultimately decide whether or not you get approved) while other judges would only accept "Self Protection" as a valid reason. In those days it paid to learn which county judge went which way, and present them with paperwork that was to their liking.
Also, consider that there is a (subtle) difference between asking "why do you want a permit?" and "Why do you need a permit?" And, there is the off chance that the officer asks everyone, so that when someone answers "I need it to get a gun to shoot people (or person XXXX) he can take that into consideration. It may sound stupid, but believe it or not there are people out there who will answer questions like that. Police bust people often (if not everyday) simply by asking questions like "Got any dope on you?" Idiots who answer "yes" find out pretty quick what happens. If even one idiot is kept from getting a permit because he (stupidly and honestly) answers that he intends to harm others, isn't it worth asking all of us that (stupid) question?
They could be asking to see if you get easily upset, flying into hysterics about your rights after being asked a simple (and supposedly reasonable) question. Such a response might indicate a less than stable personality, again, someone who probably ought not to have a gun permit. Or at least someone they would want to keep an eye on.
Of course, if you consider the question rude, simply say so, politely.