I'm sure Walgreens is being well compensated for this.
I'm going to assume they got a bunch of VC money with a pitch of "we found a space that doesn't have ads on it yet, and we can fix that". And now they're paying more than the value of the ads to Walgreens. They'll probably raise another round of funding off the "success" of this contract, and then bail.
How the heck did they make this deal with Walgreen when it is obviously bad?