Old English steop-, with connotations of "loss," in combinations like steopcild "orphan," related to astiepan, bestiepan "to bereave, to deprive of parents or children," from Proto-Germanic *steupa- "bereft" (source also of Old Frisian stiap-, Old Norse stjup-, Swedish styv-, Middle Low German stef-, Dutch stief-, Old High German stiof-, German stief-), literally "pushed out," from PIE *steup-, from root *(s)teu- (1) "to push, stick, knock," with derivatives referring to fragments (see steep (adj.)). Barnhart suggests the forms in -f- are by assimilation of the first sound in following words for "father."
Etymologically, a stepfather or stepmother is one who becomes father or mother to an orphan, but the notion of orphanage faded in 20c. and came to denote simply relation through marriage. For sense evolution, compare Latin privignus "stepson," related to privus "deprived." Compare orphan (n.).