In a theoretically perfect world, you don’t have to print them horizontally, but here’s why the world isn’t perfect:
As you lay each layer of filament, it should theoretically come out hot enough to melt part of the layer below and beside it so that the previous and current layers weld into one uniform piece. There should also, theoretically be exactly enough filament extruded to fill in the gaps - remember the filament comes out as a cylinder.
In there real world, there are almost always some gaps left between layers. It’s a very fine line between filling in the gaps 100% and over extruding, which gets messy. Obviously, air gaps create weakness.
Similarly, if the newly laid filament isn’t hot enough to melt the adjacent filament, it will stick, but not weld together. It’s another major point of weakness. Easy! you say, I’ll just crank the heat up! Well, that leads to stringing, sagging of filament along the edges or overhangs, and imprecise fit for mechanical parts. Also, there’s the phenomenon of “heat creep” where the filament and fans can’t extract the heat fast enough such that the hot spot begins to move up the hot end and into the Bowden tube which will jam the filament. In very extreme cases, you can actually burn the filament which changes it’s physical properties and causes jams in the nozzle, so again, finding the perfect balance is tough.
The end result is that you will pretty much never get the mechanically solid properties you could get from extruded pipe, even though both the extruded pipe and the printed pipe may be made from the same type of plastic (ABS for example).
Since the air gaps and inconsistant melting defects are introduced as the layers are laid down, the weak zones follow the layer lines.
This in turn means that a 3D printed part will inherently be stronger in the direction across the layers, since each layer is laid down as a single extruded piece of plastic, whereas the strength along the layers alternates between strong (within the layer) and weak (between the layers). They will almost always fail along the seam between layers.
If you print the pipe vertically, such that the layers go across the pipe, you will also have corresponding weaknesses going across the pipe with each layer. That means many, many, many points of weakness whereas if you print the pipe horizontally, you still get weakness between the layers, but the layers themselves run the entire length of the pipe.
Keep in mind that for most pipes, they experience bending across their widths more than they do along their lengths. (there’s probably a more technically accurate way to express that)
It’s similar, I suppose, to the concept of putting rebar in concrete. You could put a bunch of short rebar pieces oriented vertically, but the concrete will still be weak. The rebar has to perpendicular to the axis along which the concrete is likely to snap for it to do any good.
A continuous layer line is the plastic equivalent of rebar. Because it’s extruded as one continuous piece its bonds stronger within itself than the bonds are with adjacent, hardened, filament.
For funzies, you can just try printing a narrow tube in both orientations and try it for yourself.