Walgreens has tens of thousands of stores.
No business is in the business of losing product and losing profit, but to answer your question, in order to not to appear politically incorrect, they keep open stores in high loss locations and they don’t actively interdict theft and use all of their stores to subsidize it.
The Walgreens and CVS stores closest to me have closed. The stock was just walking out the doors.