ボブ:アリスは学生?
Bob: Is Alice (you) student?アリス:うん、でもトムは学生じゃない。
Alice: Yeah, but Tom is not student.
In this example the topic is about students. Why do you have to say student a second time right here ”トムは学生じゃない”
First, please make sure what a grammatical topic is. It is true that the theme of this conversation is "who are the students?", but that's not a grammatical topic of these sentences.
アリスは学生?
うん、でもトムは学生じゃない。
Here, the topic of the first sentence is アリス, and the topic of the second sentence is トム, because they are clearly marked with the topic marker, は. 学生だ/学生じゃない are called a predicate of a sentence.
In Japanese, you can omit the topic altogether if it can safely be inferred from the context. In this case, however, you can't omit トムは because the topics of the two sentences are different.
Second, you may be interested if it's possible to avoid saying 学生 twice anyway. In English, you can often omit predicates to avoid repetition, like this:
Are you a student? — Yes I am (a student), but Tom is not (a student).
You can avoid saying 学生 twice in Japanese, too, but it's a bit trickier. You can not simply drop the repeated word and say トムはじゃない or トムはない. Instead, you have to say something like 私はそうですが、トムは違います。
Sorry if I've not understood your question correctly.
The short answer is "you don't have to."
Instead of トムは学生じゃない, you can say トムは違うよ ("Tom is not.") etc in order to avoid repeating 学生. I think both sentences are equally very natural, partially because it is a colloquial conversation. In this case, Alice just selected repeating 学生.
By the way, as for topic particles, the topic indicated by the particle は is not strictly (general) students, but Alice and Tom respectively.