Why is the standard integral the Riemann Integral?
In introductory calculus courses, you are introduced to integration via the Riemann Integral. Often, you are shown a diagram such as the following
which defines the Riemann Integral as the sum of the areas of these rectangles.
My question is, why are these rectangles vertical (domain-defined) instead of horizontal (range-defined) like below?
From my understanding, the horizontal orientation is known as the Lebesgue Integral. So then my question becomes: when is it better to use either one over the other? And also, why is that, we are introduced to the Riemann Integral over the Lebesgue Integral in introductory calculus?
The basic idea of the Riemann integral is to approximate the area under the graph of a function $f : [a,b] \to \mathbb R$ by sums of rectangles. Technically this is done by partitioning the domain $[a,b]$ into subintervals $J_i = [t_i,t_{i+1}]$, assocating a lower and an upper rectangle to each $J_i$ which enclose the graph of $f \mid_{J_i}$ (let us call them ad hoc "Darboux rectangles") and then forming the upper and lower Darboux sums to the partition. Alternatively you can pick a point $\xi_i \in J_i$, associate the "Riemann rectangle" $J_i \times [0,f(\xi_i)]$ and form the Riemann sum.
Both are very simple and intuititive procedures which give equivalent concepts of an integral.
Your "horizontal rectangle approach" does not work like that; the example in your second figure is completely misleading. Of course you can cover the range of $f$ by (small) intervals, but how can you assign a horizontal rectangle to such an interval $[c,d]$? What would be the analog of a lower and an upper Darboux rectangle or a Riemann rectangle?
As an example consider the following graph $G$ of an oscillating function $f : [0,5] \to \mathbb R$:
Which horizontal rectangle would you associate to a subinterval $[c,d]$ of the $y$-axis? It does not make sense to approximate the piece $G_{[c,d]} = G \cap ([0,5] \times [c,d])$ by a single rectangle; you need more than one to nicely approximate the area. Try to do it explicitly and you will see that it is really unpleasant to make it precise.
The above example is still a "nice" one; if you have infinitely many oscillations you may need infinitely many rectangles to approximate $G_{[c,d]}$.
I conclude that a naive approximation by horizontal rectangles does not really make sense. The point is that you have to approximate the subset $S_{[c,d]} = f^{-1}([c,d])$ of the domain of $f$ by suitable rectangles $R_k$, form the union $\bigcup_k R_k \times [c,d]$ and compute its area.
Finally this leads you to the concept of measure; you have to associate to $S_{[c,d]}$ its size. And that leads to the concept of the Lebesgue integral. This is a much more complicated and less intuitive access to integration, though it is superior from a higher point of view. But for beginners I would recommend to introduce the Riemann integral.