The customer who sits half a day in a Starbucks is doing free advertising for Starbucks. A filled and busy shop attracts much more business than an empty one.
I've had chats with the manager of one of my favourite locations. It gets pretty slow mid-afternoon, and she made it really clear that she's super happy having some people sitting in there working, even if they're sipping the dregs from a 2-hour-old free-refill coffee. The regulars usually have chatted at least a little bit (maybe that's a Canadian thing), and having conversations or work going on improves the atmosphere.
The trick with restaurants is to sit customers near the window so it looks like they are more busy than they are. Ever wondered why in a huge mostly empty restaurant you're placed next to existing customers.