Yes its a defect.
But its a defect in the specification.
This in turn could be a defect in the requirements gathering.
This could either be the analyst misunderstanding the users request, or, the user requesting the wrong thing or usually a mixture of both. (But I always blame the analyst! --- on the same basis that you would still blame a doctor for mis-diagnosis on the basis of poor communication with an inarticulate patient).
In theory this is the same as any other defect - report it, fix the spec, recode and retest.
However in practice these can be a real pain as they cross organisational , and often company boundries. If you are a subcontracting software company and you produced the software according to the specs then contractually this is not a defect in your software, you should get new, better specs and be paid extra to code to the new specs.