they were created because then british rail had a large shortage of trains so rather than spending lots of money on expensive proper trains, they invented the pacer. british leyland at the time had a surplus in the production of bus bodies so the idea was to weld the bus body from an old bus on to a freight waggon chassis. the result of this was that pacers have notoriously poor suspension and are noisier around corners due to flanging (the squeaky noise that you'll sometimes hear when travelling by train). this makes them non-ideal passenger trains so they are now being replaced (or have been replaced in the case of the class 141) by new trains.