If you look at a typical P&ID for a centrifugal pump, you will notice a piping reducer at the pump suction and an expander at the pump outlet. This is almost always true.
So why do we need reducers and expanders at pump inlet / outlet piping?
Matching the pipe size with pump nozzles
The primary reason for using reducer and expander in inlet/ outlet piping is to join the respective pipe sizes with smaller pump nozzles.
Larger upstream pipe on the suction side joins with a smaller suction nozzle using a reducer.
And a small discharge nozzle continues into a larger outlet pipe via an expander.
Basically, the reducer and expanders are needed because pump nozzles are smaller than the piping on respective sides.
Why not have smaller piping at suction and outlet?
What is the need to have larger piping at pump suction and outlet?
If we select smaller pipe sizes, it will result in increased frictional pressure drop in pump suction and discharge. That will undoubtedly put more demands on the pump itself. Moreover, high frictional losses on the pump suction side also decrease the available NPSH at pump suction. For centrifugal pump, it means increased possibility of pump cavitation.
Hence the line sizes for pump inlet and outlet piping is carefully chosen after accounting for the frictional losses across the length of the pipe.
Why not have a bigger pump and pump nozzles?
If we absolutely need to have large diameter for the pump inlet / outlet piping, why not have the pump nozzles of the same diameter as well?
Pump nozzle sizes actually proportionate to the overall size of the pump itself. As we want a smoother liquid flow throughout its path in the pump, we cannot have a sudden change in pump nozzles and rest of the channels through which liquid flows.
Bigger nozzle would mean a bigger pump size, increasing not only the material costs but also the operating costs.
You can easily avoid this unnecessary increase in cost by having pump nozzles smaller than the inlet / outlet piping and then using reducer and expander for flow continuity.
Why eccentric reducers are preferred in pump suction?
Concentric reducers can cause accumulation of vapor or air in upper pockets.
In case of centrifugal pumps, if this vapor can cause pump cavitation if it escapes into the pump. It also increases the liquid velocity at pump suction, which is undesirable.
You can avoid these problems by installing eccentric reducers in pump suction instead of concentric ones.
Check this detailed post on use of eccentric reducer in pump suction piping.