Though you might think the car makers put them there to make them harder to replace, the real reason is for cooling, lubrication and to help isolate pump noise.
One of the leading causes of failure for in-tank electric fuel pumps, according to one pump manufacturer, is fuel starvation.
Most tanks have baffles or a built-in sump that keeps the pump's pickup submerged in fuel. But if the gas tank contains only a few gallons of gasoline and the vehicle is driven hard around a corner, the fuel may slosh away from the pickup and momentarily starve the fuel pump, causing premature failure.
Note from Chris Behier: Fuel pumps will also have a period where you can recognize that failure is around the corner. If you start hearing excessive noise (loud whine from when you start the car until your ignition is off) from your fuel pump/trunk area -- your pump is on its last leg. Also, if it coincides with over 100K miles of usage, that is a pretty good sign. replace it soon, or it can leave you stranded.
Author: Rodd Sidney
Reprinted in Bimmer Bulletin, Michiana Chapter