How does the LLM know what the "nonsensical" (I think you meant irrelevant) parts are? It requires world knowledge to know. And in any case, I'm pretty sure the AI is built to think that all the parts of a query are relevant.
Well chatgpt doesn't know if there will be a follow-up question relying on the "irrelevant" information. So in general it can't remove it. Or at least it would require some more complexity to dynamically decide what is relevant and not over the lifetime of the conversation.