There is no such thing as an impossible task, it is all a question of resource/time/quality.
Projects should be developed in an agile way, always changing to meet the users requirements and should be designed as such. The most important thing to do is listen to the user.
"Walking on water and developing software from a specification are easy if both are frozen."
Edward V. Berard
The Projects fail because of multiple reasons which include Improper addressing of business case requirements, the project may be an impossible task, the Governance may be poor, people loose focus on the Benefits of the Projects. If the business case of the project is not understood properly, the Implementation of the projects goes in wrong direction and the required benefits become non-achievable. Another significant component to the success or failure of the projects is the Management Skills of the Project Management team.