The classifications are like priorities.
We should probably rarely, if ever, sacrifice natural necessary desires for unnatural necessary ones, when keeping long term pleasure in mind.
I started to just click "like" and move on, but on second thought I am not sure this - even with the rarely caveat - does not just restate the problem. *Are* these classifications priorities, or are they just predictions of the relative cost in pain?
I wanted to make an exception for "those things necessary to remain alive," but even that isn't absolute -- Don't we sometimes give our lives for a friend?
The "rarely, if ever" helps, but isn't that the question you are asking? What is the rule that allows you to know when those exceptions would apply, other than that this is a personal decision involving the way you personal estimate the final outcome in terms of net pleasure of all kinds over net pain of all kinds?
As a generalization I think we all can see that the classification makes sense. However you're asking the right question -- when do the exceptions apply, to to know that you have to know what *really* is the overriding analysis. I don't think we find the ultimate analysis here in this classification alone. The ultimate question is always going to be the external consideration of expected result that isn't stated in full just by stating the classes, or by stating that those desires which don't bring pain - if unfulfilled - are "empty."
Maybe another way of stating this is that the Epicureans never stated that the ultimate goal of life is "the pleasures achieved through natural and necessary desires." The goal is "pleasure," and the reason there can be no qualification is that everyone's situation is going to be different. Is it possible to generalize? Yes, definitely. But generalizing is not the same as a hard and fast rule, even of "priorities." I think Don and maybe others have given good examples of the exceptions (such as "holding your breath to dive to get out of the cave" or whatever.)