"End cap effect", or "closed end effect" is due to internal pressure acting on (virtual) plates assumed to be on each end of a pipe segment such that internal pressure (P) is contained. "End cap force" is thus equal to pressure x plate area, or P * pi * D^2/4, D being diameter, and causes axial tension on the pipe.
It is not due to flow. However flow affects the end cap force, since flow is always accompanied by pressure drop in the segment, so the internal pressure is no longer constant. For short segments of a closed pipe, assume the flow is entering and exiting through T-branches located very close to the end caps of the segment, and you can see that internal pressure would be higher at the entering end and lesser at the exiting end. Consequently end cap forces would be higher at the entering end and lesser at the exiting end as well. Flow would thus tend to cause an imbalance along the pipe segment axis, such imbalance equal to the pressure drop in the segment of pipe x pi x D^2/4.
The end cap force, while it may be lessened by flow in the segment, is always present, as long as there is some internal pressure. Consider a long pipeline with 1010 psig inlet pressure and 10 psig outlet pressure. End cap pressure at one end is 1010 x pi x D^2/4 and at the other end, 10 x pi x D^2/4. Axial imbalance equaling 1000 * pi * D^2/4. The maximum axial force (and tension stress) would be located at the flow entrance end of the pipeline and it would slowly decrease as you move to the discharge end of the pipeline. So, if the pipeline is 1000 miles long, it would be losing 1000 psi * pi * D^2/4 / 1000 miles of force per mile, or pi * D^2/4 lbs of force / mile, of the end cap effect.
**********************
"Pumping accounts for 20% of the world’s energy used by electric motors and 25-50% of the total electrical energy usage in certain industrial facilities."-DOE statistic (Note: Make that
99% for pipeline companies)