There is no magic: producing milk or meat requires proper nutrition. Cows need constant access to feed.

Feeding fronts separate the eating area from the feed bunk, provide an easy access to feed for cows, while allowing for easy management for the farmer. The dimension of the feeding front must allow each cow to have access (optimally) and headlocks help prevent competition between cows.