Saying "I got this code from ChatGPT and it doesn't work"
This is not a rule violation. The generated content is not being presented as the user's own, and it's not being presented as an attempt to answer the question. Instead, it's just an elaboration upon "the site said I should explain what I've tried already, and I've tried asking ChatGPT". The code itself is generally noise in these cases.
(Saying "I tried asking ChatGPT" is generally also noise in these cases. It doesn't help people understand what the question is. Keep reading for more on that.)
MCVEs are for "what is wrong" questions, not "how to" questions
If someone is asking how to do something, an existing code attempt to do that thing is not relevant - unless the question has been poorly asked, and really is a question about how to fix that code.
Most of the time, people who ask "how do I do X?" really do want to know "how do I do X?", and their non-working attempt at doing X is a distraction. It assumes a general technique Y, which might not be appropriate. Either the question should be closed as unclear, or the code should be removed. The provenance of the code is irrelevant to that.
The "What have you tried?" question
The reason we ask "what have you tried?" is not to gatekeep people who are "unworthy" of getting an answer because they are too "lazy". Instead, it is to help identify the actual question.
If the question as stated is "how do I do X?", saying "I tried Y" is not actually a good thing to include in the question. Instead, the person asking should reflect upon the result of trying Y, to refine the question:
Is this really a question about how to do X using Y - i.e., about how to make Y work, or about the Z problem that occurred when trying Y?
Is it really a question about specifically how to do X without using Y?
If X is complex, does Y represent an attempt to analyze and decompose X? If so - where did it go wrong? Now the question is actually about that step in the process.
However, if Y is ChatGPT-generated code, then it almost certainly does not help refine anything. People who are asking ChatGPT to write code are not analyzing the problem. They cannot reasonably be expected to do any reflection on the code - if they could understand it as-is, they could have written it themselves. Such code should, again, be edited out to leave a plain "how do I do X?" question, because when Y is not understood by the asker, "how do I do X with Y?" is incoherent. (Explaining Y - see the next section - is a separate question, if it's valid at all.)
But what if ChatGPT tried to explain?
If the question is about an explanation that ChatGPT offered for the code it generated, that's a whole other kettle of fish. Such questions are almost always closable as unclear.
If the code is buggy, then there is nothing to explain. Garbage in, garbage out (to/from the "explain code" algorithm).
If the explanation is incoherent, then there is no good way to make sense of it. Perhaps it can be edited out, but then this just leaves an "explain this code dump to me" question.
If ChatGPT managed to generate working code and a coherent explanation, and OP just doesn't understand the explanation - what is the remaining question? There needs to be a concrete way for us to understand why OP does not understand the existing explanation, in order to be able to write an answer. And then it still needs to be something that could potentially be of use to others. In which case, there is probably a better way to create the example.