It benefits neither the company nor the candidate to have the candidate be overly stressed out all day. Lunch also gives the candidate the chance to chat informally to a potential colleague and for that potential colleague to make a pitch for why it's cool to work at the company and live in the area. If the lunch buddy does their job well the candidate should leave excited to work for the company and in good spirits for the last half of the interview. On top of that both people get a free lunch. Definitely not a waste of time.