Sometimes, a student who has a lack of knowledge, tries to change the topic of a question so that it will be about what he knows and can speak about. Is this a known phenomenon in psychology?
Tom Boardman's suggestion in the question comments about the Law of the Instrument ("if all you've got is a hammer, everything looks like a nail") seems to capture an important aspect of this, especially with respect to illustrating that it's not necessarily done out of malice.
The simplest theoretical explanation would cast this in terms of top-down processing and attention (Ward, 2008), combined with the availability heuristic (Schwarz et al., 1991). These two factors lead to a situation where whatever a student is knowledgeable about is more likely to come to mind in a discussion, and then whatever is on the student's mind is incorporated into the discussion. When the student encounters something that doesn't fit into what they know well, they might inadvertently change the subject to something that does, simply because that's what comes to mind and thus ends up being what shapes their thoughts.