We had just one working dairy farm still in my family, when I was a kid in the 1970's and 80's. They did pretty well, with 180 cows and 280 acres, which is big for this area defined by 100-acre Penn's land grants. I remember my great-aunt telling me that the only way they were profitable after the 1950's or 60's was by specializing into boutique products, that it was no longer possible to stay profitable at their small scale on commodity products.
That may explain why the farm stores seem to be tied to the few farms that remain, those just doing bulk work couldn't be profitable enough for the next generation to stay in the business, when the older generation aged out. One of those "Grow or die" situations, for staying in bulk commodity work, the stores bring in a different kind of income from those who value local foods.
A cow plague hit this area in the late-1980's, and my aunt and uncle lost something like 70% of their herd in a few weeks. They were already 70 years old, so took that as the sign to at least partly retire. They kept milking the cows that survived, for at least a few more years, but never replaced them. None of their kids took over the farm, they had already chosen other careers 20 years prior.