{ Amazon, Target, Walmart } happened.
In the 80s the local pharmacy was your primary source of sundries, towns and cities alike. Everything from hardware to toys to medicine. If the local pharmacy didn't have it, you didn't buy it.
Now with hoards of Chinese shit available at your fingertips to order with same-day delivery, pharmacies couldn't survive on selling medicine alone, of which there are very small margins.
San Francisco and other cities making widespread theft and shoplifting de facto legal didn't help either. Local mom & pop pharmacies can't afford to put the entire store behind glass.