An electron emitted from the filament undergoes a number of collisions inside the material and loses its kinetic energy before coming to rest. This energy is utilised to give out photons or  eject electrons from the atoms of the target. These electrons move to the battery connected to the circuit. Thus, the target does not get more and more negatively charged as time passes.