He highlighted a very obvious flaw in an 'experiment', and under the guise of such outstanding altruism proceeded to exploit said flaw to net over $500. To further his noble and honest cause he then published code and instructions on github to make the flaw even easier to exploit and allow other people to join in. He legitimised it.
To try and ease his mind over the implications of this, two justifications are offered:
1. his script only works when the card contains at least $50 (not that it's hard to change), at which point it's ok to proceed.
2. his own exploited proceeds will be donated to a charity that pulls sufficient heartstrings to hammer his point home (accompanied by sympathetic picture). However, of the $600+ he siphoned, there is no certainty that the balance taken will be the balance donated. Because it's on eBay.
Further to that, it's a shockingly cynical move. This guy isn't donating his own money to charity. He's taken everyone else's money, laundered it a bit through eBay (with requisite fees applied), and then donated whatever he gets from that.
Maybe he fancies himself as a modern day Robin Hood, sneering as he does at the typical Starbucks clientele. His methods and justifications are worthy of whatever criticism they get.