Two simple stories from my own experience.
I attended Shorin Ryu Kenshin Kan classes twice a week for a while in my late twenties. Afterwards, I would go for a four mile run, eventually working my way up to eight miles. (I use to run 40 to 45 miles a week in my early twenties.) My Father always admired my endurance and wanted to see me run in a half marathon. Fathers being the way they are in pushing their children, left the local paper on my coffee table opened to the sports page. He had circled the upcoming half marathons.
I called to let him know that I signed up. Yes, this was kind of a big deal to him. My folks made the trip the following week, staying overnight at my place the day before the race. Like a lot of doting Moms, my Mother did my laundry, bleaching my socks. My father and I departed for the race later that morning. When we arrived, I discovered my socks were not completely dry.
Being inexperienced, I took off strong from the starting line, leading the race the first three miles, at which point two runners overtook me. At around eight miles, the bottom of my feet started to burn and blister. I fought the escalating pain and discomfort for the next three miles. Still in third, I began to think it was ridiculous to continue. I shut out the pain and put the negative thoughts to the back of my mind. A few minutes later, my will slipped. Just as I slowed down to a stop, the woods to my right ended and I could see a railroad trestle off in the distance. I remember the organizers telling the other runners that the finish line was not far from the trestle. I took a look behind me and saw that I had a comfortable lead over fourth place. I decided that come hell or high water, I was not going to quit and lose my spot after completing 12 miles.
The second story occurred three years ago. My poker consisted of a low stake home game with the same loose players. It had been some time since I played poker at the casino. Business took me out of town, which gave me the opportunity to play $1/$3 at the local casino. I dumped/lost $800 in the first two hours. Sure, I could have thrown in the towel, but I knew I could also switch up my play and get down to business. 7 hours later, I cashed out down $100.
Sometimes, it is not about ego. It is about the competitive nature of the event you are in and the belief in your own abilities to turn things around that causes you to persevere when you are down or behind.