To answer this question we need to know a little history about the mechanism used to provide gasoline to the engine. The fuel transfer pump is used to move the gasoline from the tank, often at the rear of the vehicle, choose the engine. Once at the engine it is mixed with air to create a highly combustible vapour which is then ignited and used to power the vehicle.
Fuel pumps have undergone several changes over the years as the requirements of the engine have changed. Originally a carburettor was used to mix air and gasoline. These devices relied on the difference in pressure to do the mixing. As such they did not require the fuel to be fed from the tank at a high pressure. This meant a mechanical pump could be used, powered by the mechanical energy in the car. Usually by tapping into the rotation of the camshaft. However as fuel injection systems were developed the fuel was required at a much higher pressure. The pressure that could not be achieved mechanically and instead had to be provided by an electric fuel pump. These pumps forced me gasoline through a nozzle in the engine with enough pressure to break the fuel down into tiny droplets which were then sucked in too deep passing flow of air before being ignited. The accelerator in your vehicle is used to control how quickly the air is flowing past the injection nozzle, it is not used to change the amount of fuel being supplied to the engine.
Therefore, the reason an electric fuel pump is needed is to generate pressure in the fuel supply. The downside of this is that it is harder to replace an electric pump and because it is more complicated there are more things that can go wrong. It can be costly to replace this kind of pump because of its location and the skills required by the mechanic when dealing with electricity and gasoline.