This has always been given as common wisdom, and there is a great deal of value in it. Some people do give up rather than dealing with difficulties along the way.
Sometimes, however, admitting defeat is the best thing you can do. It can be humiliating and make you feel like a failure. It can feel like you have lost all the time/money/effort/love you have put into it. But cutting your losses and moving on to the strange unknown can sometimes be the best thing ever.