It’s an awesome episode. One of the best ever of all Trek. Great acting! People would just walk into the disintegration booth without any fear or defiance. It should have one an Emmy.
Yes, that really gripped me as a kid, having already heard about the holocaust from my uncle.
It was explained that they went willingly, believing it was their duty as citizens, in order that the great works of their culture might survive.