Originally Posted by jangelj
I have noticed this same thing with every beer I have kegged, no matter how long I primary. The flavor always changed once kegged. I don't know if it is the temp change, carbonation level or what, but they always taste better after 4-7 days in a keg. They generally stay that way for a couple of weeks, then the flavors slowly change (for the worse) over the next couple of weeks.
I'd imagine the perceived improvement is #1 carbonation. We are used to a carbonated beer and all that goes with it. effervescence allows the compounds into the air so we smell the beer as well as taste it better. #2 often times cooling beer will make off flavors less noticeable. ie. coors light being served at near freezing... #3 general aging of beer allows the compounds to meld and become more agreeable with each other. This is the only reason I secondary, because I find pretty much any beer is better off with a month or two in bulk aging. The same thing happens when it is in the keg. I actually often use extra kegs as secondaries then carb when I'm nearing service.
as for the beer going bad after a few weeks in the keg... That shouldn't happen. You probably need to look into your sanitation tech as the keg is no different than a bottle. It is a sealed vessel and as long as you make sure every thing is sanitized a keg will last for months if not years. remember to spray down your posts and the connectors on the lines every time you remove them or attach them. and most importantly, try not to leave beer in the lines for any extended period of time. Hopefully this help and you can avoid batches going south on you in the future.