The "attending buys the resident lunch" results in an excellent return on investment.
For an attending that earns $200k, works 55 hrs/wk, $20 is 25 mins. of work.
To a resident earning $60k, works 80 hrs/wk, $20 is 106 mins. of work.
Not to mention the benefits of generosity!