When you remove an electric fuel pump from a gas tank you'll notice a filter or sock on one end. This is what's called the "strainer." It might look like an afterthought, but it's an essential part of the fuel delivery system.
Modern fuel pumps are built to very tight tolerances to ensure long life and quiet operation. The downside is that this makes them vulnerable to even the smallest particles of dirt sloshing around in the tank.
Making matters worse, the fuel pump intake has to be as low as possible to maximize the usable volume of fuel. That means it's going to draw in a lot of particulates, especially if the tank is dirty. And if you think the tank is clean, try wiping a finger, or better still, a white glove, over the surface. That tank is anything but clean!
The strainer covers the fuel pump intake. As fuel is drawn through, those particles are trapped in its very fine mesh. Manufacturers make the strainer as large as possible, within the constraints of the tank design, so that it doesn't clog during the life of the pump. If that was to happen (and sometimes it does with dirty fuel), the pump would get hot and it's possible the engine would run lean.
Anytime the pump is replaced, a new strainer must be used. Not doing so will invalidate the warranty on the pump, not to mention creating a lot more work when it has to be replaced a few weeks or months later. Strainers aren't expensive; so don't be tempted to economize.
Many new fuel pumps come with a strainer, so there should be no excuse for reusing the old one. Anytime you have the pump out of the tank, you might as well replace the strainer, for the same reason.
The strainer needs to be fitted carefully. Push it straight on by hand and don't use a screw motion. This can cut or score the inlet, resulting in particles finding their way into the new pump. Neither should you hammer on the strainer as that can leave a hole in the mesh allowing larger particles through. Just ease it straight up over the inlet.
That strainer over the fuel pump intake was no afterthought. Leave it off or accidentally damage it and you'll be replacing the pump much sooner than you expected. Reuse an old strainer and you risk damaging the pump and affecting how the engine runs. Neglect it at your peril!