The normal ticket gate behavior in Japan is that when you enter, the gate gives you the ticket back so that you can carry it all the way to the exit in order to prove that you traveled that journey. When you go through a ticket gate to exit the station, all Japanese ticket gates to my knowledge will dispose of your ticket.