Why is the same word used both for "going quickly" and "not eating?"
The fast words are one of the knottier knots in English -- in all of Germanic, really, as the split in meanings in English fast seems to have happened in Scandinavian tongues, and German cognate fast has come to mean "almost."
The Proto-Germanic root seems to have been something like *fastu-, and its sense was "firm, solid, steady." The Old English senses of fæst stuck close to this: "firmly fixed, steadfast, constant; secure; enclosed, watertight; strong, fortified."
We still use it when we speak of colors and dyes being made fast and in some compounds still current, though tasting of the past: Fastness "a place not easily forced, a stronghold," steadfast "secure in position, steady, firm in its place."
The modern neo-pagan revival of handfast "betroth (two people), bind in wedlock" brings back the old sense of the word in a compound attested both in Old English and Old Norse.
Bedfast, apparently now limited to nursing, was a 17th century word for "bedridden." Old English had soothfast (soðfæst) "true, trustworthy, honest, just," perhaps literally "firm in truth."
It's also the second element of shamefaced "modest, bashful," but folk etymology has altered this from the original shamefast, from Old English scamfæst "bashful," literally "restrained by shame," or else "firm in modesty." Fowler's entry on it in "Modern English Usage" indicates the older form was still around in 1926:
It is true that the second is the original form, that -faced is due to a mistake, & that the notion attached to the word is necessarily affected in some slight degree by the change. But those who, in the flush of this discovery, would revert to -fast in ordinary use are rightly rewarded with the name of pedants ....
It's also the -vast in the old sailors' cry avast! "hold! stop!" which probably was worn down from Dutch houd vast "hold fast."
And German feste means "firm," as in Luther's great hymn, Ein feste Burg ist unser Gott.
But Old English also had a verb form, fæstan, meaning "to refrain from food." Originally it was "to refrain from food or observe abstinence as a religious duty." The notion would be to "hold firmly" to one's pledge or duty, to "have firm control of oneself," and thus "hold oneself to observance."
Perhaps the Germanic word was used to translate Church Latin observare in its sense "to fast," or it might have been a loan-translation of a Greek expression brought to the Goths by Arian missionaries and spread by them to other Germanic peoples.
This became so much the sense of the verb fast that a new form, fasten, rose up in Middle English to mean "make firm or fixed."
Fast with the meaning "rapid, quick" is from an earlier development of the adverb fast, which by c. 1200 had come to mean "quickly, swiftly, rapidly." This probably is from or influenced by Old Norse fast which meant both "firmly" and "quickly."
The shift from "firmly, strongly, vigorously" to "quickly" might have happened because to run hard means the same as to run fast. Or perhaps it is from the notion of a runner who "sticks" close to whatever he is chasing. The English expression fast by "near, close, beside" also is said to be from Scandinavian.
Later Old English also used the noun fast for "voluntary abstinence from food and drink or from certain kinds of food," especially, but not necessarily, as a religious duty. This formed the second element in breakfast (n.). "first meal of the day," which is attested from mid-15th century. An Old English word for it was undernmete, from undern, an obsolete word for "morning" (with meat in its older, general sense of "food, a meal") also morgenmete "morning meal."
Out of the "speedy" sense of fast (adj.) comes the modern (18th century) sense of "living an unrestrained life, eager in pursuit of pleasure," as in fast and loose, which brings the word full circle from the old notion of "observe abstinence as a religious duty."