They have the ability to either check whose voucher it was based off the player's card that was in the machine OR track the last player's movement through the casino through surveillance footage and give it back to him/her. I always cash it out and hand it over to an employee.
I have found large amounts of money ($100.00+) left in machines on a few different occasions.