In the event that the hydraulic system does not have a pressurerelief valve or is not installed, we can think of two things. What type of
pump the system has. Fixed
displacement (gears, vanes or pistons) or variable displacement (with or without pressure compensator).

In the second case, if the system is using a variable displacement pump with pressure compensator, well! there is no problem, the system has surge protection, this is the function of the compensator.

In the event that the pump displacement is fixed, we have a serious problem.

If we analyze a simple hydraulic system as shown below, we will see:

Once the motor or engine starts rotating,
fluid is been pumped inside the system and if we move the handle of the directional valve the hydraulic
cylinder is going to move against the wall. When it reaches the wall the cylinder stops because the load to move is too big but, the pump is still pumping!!

Let's see the second drawing.

You can see the
line that goes from the outlet of the pump directly connected to the back of the cylinder. Everything is "pushing" the wall. The fluid is very incompressible, so in a matter of miliseconds the weakest part of the system that is "pushing" or under stress is going to break. Either the cylinder rod, or the cylinder tube, cylinder piston, cylinder rear cover, or any of the pipes, the hydraulic
valve body, the pressure gauge, or any part of the pump including the drive shaft, the shaft coupling, or even the motor(prime mover).

So, to prevent this, this is how the hydraulic system must look like:

Now our hydraulic system is protected against overloads.

Remember: The fluid contained inside pipes or any hydraulic component behaves like liquid steel, as strong as it is.