It's a loss leader for them, the aims will be (1) that people start going to them rather than other places for their sandwiches etc (2) that people drag their friends/colleagues with them and they buy something (3) that they annihilate the competition who can't compete especially the independents
(4) the IMMENSE data capture opportunities they'll get from when and where someone gets their coffee and what else they regularly buy, all of which data will have a value they can reclaim by selling it to other companies.