There are several styles of beer that can be stored such that they continue fermenting in storage and become a final, drinkable product by the time it gets connected to a tap-so this is HEAVILY dependent on what kind of beer you’re making, it’s not really applicable as a universal statement for the storage of several kinds beer. IPAs for example can last quite a long time if properly store (up to four weeks I believe?).
Beers brewed in casks obviously have a different fermentation cycle than something brewed macro systems but storage is less of a problem than you may think for brewpubs and gastropubs, generally speaking. Wits can last for a while if properly stored and rotated (physically as in turning the keg on end), for example. But even then, casks aren’t ideal for long term storage in many cases, and not all beers are suited for storage in casks as opposed to say: steel kegs.
(Spent quite a long time in the service industry and worked two large breweries in Texas)