I expect the five-year requirement is to protect the rights and welfare of everyone, particularly children. Maybe five years is a bit too long but I can see why it's there.
We've had a number of Grans who've told of how they've been abandoned in older age, or have a daughter with young children who's been abandoned. Most times the man has gone off with a new love.
A quick 'divorce on demand' could be disastrous for the reluctant soon-to-be divorcee. How can property, assets, maintenance, etc be fairly dealt with when it's been sprung upon you, and you are not the one who's been scheming and planning?
Obviously 'innocent' parties can suffer e.g. someone who escapes abuse and the spiteful partner refuses a divorce as a further way of controlling, but the law applies to everyone no matter how seemingly unfair in some circumstances.