"Runs for 2.5 miles" is perfectly normal English.
One sense of for
The word "for" is being used in its sense of extension or duration, as in:
John and Marsha talked from 2:00 to 2:20 p.m. They talked for 20 minutes.
I commented to my dad about how big everything looked and how it seemed as if we drove for miles and miles and the mountains in the distance never moved or got closer. [Source]
I can see for miles. [Well-known song from the 1960s. The phrase literally means that I can see clearly across a long distance. In the song, it's used metaphorically.]
This email goes on for several pages.
Combining overlapping meanings
Many words in English, especially the little Anglo-Saxon words, mean many, many things. For example, "for" means: favoring, exchange, purpose, signification, correlation, and many other things. "Run" means to propel yourself on alternate feet without both feet on the ground at the same time, as well as: to operate (machinery, a business), to direct, to hurry, to travel quickly, to accumulate, to extend, and still other things.
A common way to reduce the ambiguity of these little words is to put two of them together, in order to evoke the meaning they hold in common—usually supported by still other cues in the context, of course. That's what's happening with run for in your example. Both of these words can carry the meaning of "extension"; putting them both together clarifies the meaning. One could also say "run 2.5 miles", which is fine, but including the word "for" reinforces the meaning of extension in the reader's mind.
Here are some other ways that "run for" can occur in the same sense as in your example sentence:
John and Marsha talked from 2:00 to 2:20 p.m. Their conversation ran for 20 minutes.
This email runs for several pages.
Interstate Highway 10 (I–10) runs for 2,460.34 miles, from Santa Monica, California to Jacksonville, Florida.
You can substitute run, run on, or run on for in place of run for in the above examples. "On" adds the suggestion that the extension or duration is exceptionally long. "Run on for" uses three words to reinforce the meaning while adding on's suggestion of "this is exceptionally long".
"Run" and "for" are combined to get their common meaning, but the primary meaning of run is not completely lost. "The path is 2.5 miles long" sounds dull and dry. "The path runs for 2.5 miles" literally just states the path's length, but it also evokes the idea of continuous motion in the primary sense of run, leading the reader to imagine traveling along the path for its entire length.
A few more run fors
Just so you don't think that combining "run" and "for" eliminates all ambiguity, here are a few other meanings they can make:
We ran for four miles, and then we were exhausted. [Running in its primary sense involving moving yourself fast with your legs.]
Terry Shiprock is running for mayor. [Seeking election.]
I run this business for pleasure more than for profit.