Why in old English text was an ''s'' written as an ''f''?
It wasn't; it was just written differently according to its position in the word. The f-like s (like an f without the crossbar) was a tall variant used at the start or in the middle of a word, which the modern s was used at the end or after a tall s.