You race against yourself. 99% of the runners who line up at the start of a marathon know they aren't going to win. In fact, a good portion of the runners will only be half-way through the course when the first runner crosses the finish line. But, these races are not about "winning" for the vast majority of runners - rather they are about challenging the individual, allowing them to measure themselves.
People run these events for various reasons. While it is true some run for an ego boost, most of the runners that I have met on a marathon course, start line, or finish area - are inherently optimistic people, they encourage strangers, run for causes, they know how to deal with pain and struggle - and know how to overcome it, and have established discipline to set and master goals.
I remember running several miles with a random 60 man (after several marathons - I have learned a great secret find the old guys, they know how to pace), while we ran we talked about work, family, and life. It is one of my favorite memories.
Running can be a deeply cathartic activity. I started running after a huge event in my life. It has allowed me to refocus my thoughts and emotions. Running after work, allows me to leave my work stress at the office and not letting them invade my family and home. When I miss running for a few days, my wife grabs my gym bag and simply places it by the door so I can't miss it on my way out of the house in the morning.
Yes, it is extremely self-centered. But this self-centered activity allows many to be better people, spouses, and fathers. Find your self-centered activity that makes you a better person. If it is running, that's great I'll see you on the road/trail. If it is some other activity - good for you.
"An obvious parallel between life and a marathon is the necessity to run diligently and endure to the end." - Elder Joseph B. Wirthlin, Running Your Marathon Oct. 1989.