A friend of mine has a junior engineer who does this and then responds to questions like "Why did you do X?" with "I didn't, Claude did, I don't know why".
I think words that would follow from me would get me send to HR...
And if it was repeated... Well I would probably get fired...
Some other comments suggest immediately firing.. but a junior engineer needs to be mentored. It should be explained to them clearly that they need to understand the changes they have made. They should also be pointed towards the coding standards and SDLC documentation. If they refuse to change their ways, then firing makes sense.
no hate but i would try to fire someone for saying that
See also "Why did you do X?" → Flurry of new commits → Conversation marked as resolved
And not just from juniors
That would be an immidiate reason of termination in my book.