Of course, kids do not have to live apart from their families in totalitarian societies. The Nazis, for example, did not generally take kids from their families. Neither did the Communist Party in the USSR. However, it makes sense that dictatorial leaders such as the ones in this book would make kids live away from their parents.
In Anthem, the government does not want people to have individuality. They have numbers rather than names, for example. They are also expected to treat everyone equally and not to have special friends. In this context, you can see why they would want to raise kids apart from their parents.
If you grow up with your parents, you form a family. It is your "in group." You identify most with your family and other people are not as important to you. When you do this, you form the idea that you are different from everyone else. In this book, the leaders want everyone to be the same so that they will not try to rebel against the society. The leaders want everyone to think the same so that there will be complete social stability.
This is why they raise kids away from parents. They want the kids to feel like they are just pieces in the large society -- not individuals who are tied to certain families and friends.
The student's question--"why do dictators in totalitarian societies enforce the living arrangement where children live apart from their families"--is drawn from Ayn Rand's Anthem, her novel about a futuristic dystopian society. In Rand's story, children are separated from their parents, for whom procreation is a tightly-controlled and regulated matter oriented solely towards service to the state, and forced to live in institutions where their upbringing is equally tightly controlled. Until the age of five, children live in the Home of the Infants. After that, they are moved to the Home of the Students, where they are educated and indoctrinated for ten years before being placed in the occupations for which the state determines they are optimally suited. Early in Rand's novel, her narrator, Equality 7-2521, describes the structure as follows:
"When we were five years old, we were sent to the Home of the Students, where there are ten wards, for our ten years of learning. Men must learn till they reach their fifteenth year. Then they go to work. In the Home of the Students we arose when the big bell rang in the tower and we went to our beds when it rang again. Before we removed our garments, we stood in the great sleeping hall, and we raised our right arms, and we said all together with the three Teachers at the head: —We are nothing. Mankind is all. By the grace of our brothers are we allowed our lives."
Anthem, as noted, is the late Ayn Rand's depiction of the kind of futuristic totalitarian society more widely associated with the works of Orwell, Huxley, Bradbury and others. While not as widely read as, say, 1984, it remains a compelling depiction of the very kind of dictatorial society that inspired the other authors. Indeed, as readers of Rand's more popular works, mainly The Fountainhead, know, Rand was a determined opponent of the kind of socialistic societies that she witnessed develop in Russia and Germany. The Fountainhead is a classic of literature for its depiction of an architect who rebels against the autocratic society in which he lives. Howard Roark, that novel's protagonist, is the fictional embodiment of individualism. In Anthem, it is, following his evolution, Equality 7-2521.
Rand's emphasis on state control of the raising of children is an extreme if logical extrapolation of the real-life totalitarian societies that inspired her: Russia/Soviet Union and Nazi Germany. As incomprehensibly brutal as were both of the regimes governing those states, neither went so far as to dictate procreation and remove children from their parents as Rand depicts in her novel. She was not, however, that far removed from reality. Both Nazi Germany and the Communist Party of the Soviet Union imposed tight controls on their populations and dictated the educations that children received, with those educations oriented toward blind fealty to the state.
The reason that Rand has the children in Anthem raised the way she does, then, is to further emphasize the extremes to which communists and socialists went in attempting to create their version of the optimal society. The indoctrination of children is key to ensuring absolute control over the population. Children raised to believe in a certain manner grow up to become adults who adhere to and act on those beliefs. Nonconformists end up in remote prisons or dead.
As a footnote, Rand did live long enough to witness yet another manifestation of the kind of extreme totalitarianism against which she railed in her novels: Cambodia. The Khmer Rouge-controlled regime was a very close approximation of the society Rand depicted in Anthem. Children were removed from families and indoctrinated in the ruling regime's extreme political philosophy--a philosophy that gifted to mankind yet another genocidal campaign to follow in the footsteps of Stalin and Hitler.