A more accurate statement would be "you want to reduce risk when you become dependent on the income of the investment". The danger of a more risky portfolio is that if there is a market correction, you might not have time to recover before you become dependent of the income.
If you plan to retire in the next 10 years, then it might be beneficial to reduce your risk somewhat, and bonds are certainly less risky that equities. As you get closer, you can gradually move some investment to less risky instruments to protect as much as you need to depend on.
If you are more than 10 years away from retirement, the danger of moving to a less risky portfolio is that you miss out on the market gains, which heavily outweigh the losses in the long run.