Logical fallacies do not involve themselves in questions of worthiness, usefulness, goodnesss, etc.
If the fallacy relies on this pattern of detecting necessary and unnecessary, then it is not a logical fallacy.
But the term you’re looking for is tunnel vision.
It refers to committing resources to interpretation of the world around a single immovable assumption.
I think they can certainly apply to any situation where the logic is flawed, so arguing that something is necessary since it’s part of another system which itself is unnecessary, is a logical fallacy
If we accept that something is a necessary component of an unnecessary system, but then use that fact to argue that the component is necessary in absolute terms, that’s a logical fallacy given that it’s not absolutely necessary if the system it’s a part of isn’t absolutely necessary
After researching I found it can be called a false necessity fallacy or false requirement fallacy