In Pennsylvania, some grocery stores get around this ban (which includes liquor and wine anywhere other than state stores, and beer in stores that are not exclusively beer distributors) by creating a small building within their store that operates somewhat separately as a "cafe" or restaurant, which are allowed to sell alcohol (since they also serve food).
For example, the "Whole Foods Market Devon-Mile Post Pub" (http://www.beermenus.com/places/2550-whole-foods-market-devo...) is basically a garden shed with a walkin refrigerator that is inside of the Whole Foods. While it can sell beer, the enclosing Whole Foods cannot.
Really a ridiculous system. If pot legalization progresses as alcohol legalization did/continues to, then we have a long road ahead of us.