The progress bar is a "seen at a distance" way to communicate the status of a task.
It allows users to leave the close range of the monitor and still visually see the progress of a task without having to read small text.
Human eyes can have optical confusion when processing vertical lines. This is one of the reasons most languages are written horizontally. With the exception of Asian languages like in Japan, but even those languages can be written horizontally.
The other issue at hand is the aspect ratio of monitors. They are not square so the human brain can be easily confused by lines that divide up that space. The human brain will want to process vertical lines on a monitor to create square areas of interest. This is known as the Rabatment of a rectangle.
Most user interfaces consist of many horizontal lines and introducing a vertical progress bar will likely cause the user more confusion. You can easily create Optional Illusions inadvertently just by the layout of the user interface controls.
To demonstrate how easily horizontal and vertical lines don't mix well. Read about the Vertical-Horizontal Illusion trick, where the human brain sees the lengths of lines incorrectly.
So to answer the question "Why are progress bars horizontal" it's because they have to be. Otherwise it would be confusing and distracting to the user.
Acceptable alternatives to horizontal progress bars are;
- Circle shape where the bar follows the circumference.
- Large numeric text indicating the progress completed.
- Large visual icons that represent the status (working, finished) of a task.
- 2D animation representing the work being done for the task.