Ultra-marathon running is used for an analogy. The thing about running in any race is that nobody else is affected by one's running ability. If one is a mediocre runner, one doesn't negatively affect one's co-runners; nor the quality of one's product (because there isn't one); nor the profitability of one's company (because there isn't one of those either); nor the satisfaction of one's users or the security of their data (because there aren't users either). Hence, it's not clear that running is a good analogy.
There are also some careers where nobody wants a mediocre practitioner. When one's freedom is on the line, nobody wants a mediocre lawyer; when one's life is on the line, nobody wants a mediocre doctor. Therefore, why should it necessarily be the case that companies would want mediocre programmers? Some programming does have life on the line: software in cars, planes, nuclear reactors, or Therac-25 radiation machines; or people's or company's finances: software in banking or stock trading.
There are also some careers where you simply can't succeed at being mediocre, for example any kind of research scientist: if you don't publish good work (and have the kind of innate ability to enable you to do good work so you can publish), you simply won't succeed. How do you we know whether programming is the kind of job where one can be mediocre and succeed?
I've interviewed lots of candidates, many of whom claim N years experience in language X. I'm often stunned at how much many don't know -- stuff that anybody who completes a CSX101 or algorithms or data structures course should know. Is that mediocre?