@foo9008
"I was told" I agree is somewhat vague.And the answer is it is true, not true, sometimes true and never true, depending upon your piping system.
At least for the HGL, which can increase in value as well as decrease.
The EL never increases.
You should realize that the energy line is the total energy of the fluid.
If you look at the Bernouilli equation, there it is for you - the EL is the addition of pressure energy, velocity energy, elevation energy, although these can be stated as "head".
At any location along the pipe, from the EL line, subtract the velocity head and you get the HGL.
An entrance loss for example will decrease the EL and HGL.
But what about going from a smaller pipe to a larger pipe diameter. The EL can decrease, but the HGL can increase in the the larger diameter section due to the slower velocity head.
So your statement abount EL and HGL is not quite correct if you think they always both decrease in tandem.
Certainly if EL decreases, the HGL cannot recover to where it once was.It is much better in keeping losses to a minimum, to have gradual bends, gradual changes in diameters,
Do you think the reason is friction against the side walls of the pipe for minor losses, or something else that could cause energy loss in sharp corners and changes in diameters. How does the fluid behave with sharp corners and changes in diameters?