Stater Bros. in SoCal did a similar thing. They closed scattered pharmacies over the years (in very successful stores).
Pharmacy seems like it was a very profitable thing for stores but something has changed in the past 5-10 years that has made it not so profitable. The tight labor market seems like part of it, but as is being pointed out here, there is a flood of new graduates coming which should ease that. The large chains CVS and Walgreens seem to be very stingy on staffing rarely running more than one pharmacist at a time even in very busy stores filling 500+ scripts in a day. Smaller regional grocery chains seem to be having real trouble making pharmacy work.
Pharmacy is one of perhaps few professional industries where new graduates exceeds upcoming retirements. It is really unfortunate, for those new graduates, that the number of job opportunities is falling as more and more pharmacies close. It is also complicated as prescription demand keeps rising. So it seems the business model is simply very broken. You have demand rising, labor pool rising, yet the industry is declining (maybe consolidating is the better word).