The boundaries matter, and different integration directions lead to different formulas (but the same result).
Consider a simpler two-dimensional example. What is the area between your f(x), the x and y-axis and x=1? Well, it is ##\int_0^1 f(x) dx = \frac{3}{2}##. What if we want to integrate over y? f(x) changes from 1 to 2 but our area starts at y=0, so we set up ##\int_0^2 ? dy##. The function we need to integrate over is the length between (f(x) OR x=0) and x=1 in the horizontal axis, the length is 1 for y<1 and ##1-x(y) = 1-\sqrt{y-1}## for y between 1 and 2. To avoid using a case structure let's split the integral in two parts: ##\int_0^1 1 dy + \int_1^2 (1-\sqrt{y-1}) dy##. If you calculate that you should get the same result as before, ##1+\frac 1 2 = \frac 3 2## - but it was way more messy.
The same applies to the solids of revolution. You can integrate over the volume in any order you want, but some are more convenient.