Bottle beer goes bad for three reasons:
Exposure to sunlight: Beer is sold in brown bottles so that UV and sunlight is blocked. However, still some sunlight goes in the bottle. Sunlight reacts with hops and alcohol to create skunk beer. Corny beer kegs are made of opaque stainless steel. Hence there is no scope of UV or sunlight reacting with your beer. Hence UV skunks or bad beer does not happen in kegs. Oxidation: One of the reasons why bottled beer has an expiry date is because of micro-oxidation at the crown cap crimping. Over 6 months this steel joint on the glass bottles can become loose and oxidize the beer. Corny Keg and aluminum cans have a much tighter seam and hence no oxidation. Brewers worldwide have aged sparkling wine and beer in kegs for 2 years without any apparent oxidation. Heat Staling: Hoppy bears are prone to getting stale cardboard-like off-flavors when exposed to high temperatures for extended periods. The kegs are usually taken better care off. Unlike the glass bottles that often are transported and stored in the open and outside refrigerator. Hence chances of heat damaged beer in a keg is negligiable.
Essentially can beer tastes better than bottled beer. Keg beer tastes best.
Another problem with bottled beer is that once it loses its CO2, it goes flat. There is nothing much one can do to resurrect this beer. However, in a keg, one can always force carbonate and get the fizz back. Unless there is dissolved CO2 and pressure, one cannot pour the beer. So be assured your keg beer will always have foam.