The main reason is slope and high altitude of mountains with low water availability.
Explanation:
The soil of mountain is present in thin layer with low humidity.
And due to slope like nature of mountains when it rains, rain water does not absorb in soil while it washes away fertile soil and nutrient with itself.
While the soil in valleys is fertile because valleys are plains with thick layers of soil having different nutrient types.
And when it rains, rain water collected and absorbed in plain land making soil fertile.