While refrigeration extends the shelf life of beer, it does not prevent it from going bad. Beer can be stored safely for a period of time in an unrefrigerated environment, preferably one that is cool and dry.
Well-made beers can even withstand being transferred from refrigerated to non-refrigerated environments several times within its optimum period of freshness. In general, though, the warmer the temperatures and the longer the beer is exposed to them, the faster it deteriorates. Kegs have slightly different rules than canned or bottled beer, because the quality and ease of dispensing the beer relies on the keg being stored at an optimum temperature. It is highly recommended that kegs be kept refrigerated, especially once they are tapped.