Your monthly investment is invested periodically. Over time, returns are generated on both your original investment and accumulated returns.
A longer investment duration allows compounding to have a larger impact on the final portfolio value.