In the post about pashtida, we mentioned how in the Talmud, the verb טפל meant "to paste, to plaster" (dough in the example we brought). But today that root is found in what appears to be unrelated words - for example tipul טיפול - "care, treatment" and tafel טפל - "of secondary importance" (as found, for example, in this halachic concept). How did the root end up with so many meanings?
While it doesn't appear often, the root טפל does appear in Biblical Hebrew: Tehilim 119:69, Iyov 13:4 and 14:17. The Even-Shoshan concordance says they all mean "to attach", but only in the metaphorical sense. Iyov 14:17 has וַתִּטְפֹּל, עַל-עֲוֹנִי - "you would coat over my iniquity" (JPS), which seems to carry the meaning of "paste". Iyov 13:4 has טֹפְלֵי-שָׁקֶר, which the JPS translates as "invent lies", and other translations try to express the sense of "attach" or "paste" by writing "smear with lies" or "forgers of lies". However, the Daat Mikra writes that the pasting itself is not metaphorical, but the phrase is an allegory to builders who use fake plaster when building walls or paste plaster to cover defective walls or to doctors who spread phony medicines on their patients. In Tehilim the phrase טָפְלוּ עָלַי שֶׁקֶר זֵדִים is used metaphorically, and means "the arrogant have smeared me with lies". This combination - טפל שקר - is found in the vidui (confession) prayer as tafalnu sheker טפלנו שקר. Most translations ignore the sense of attach or paste. Koren Sacks has "we have framed lies", and Artscroll uses "we have accused falsely." However, in their "Expanded Viduy Service" in the Yom Kippur Machzor, they point out that "literally the phrase means 'we have attached falsehood'."
But even with all that, we're still not closer to seeing the modern uses of the root. Klein writes that the original (Biblical) meaning was "to smear, paste plaster" and the Post-Biblical meaning was "to add, join, attach." From here he writes that tafel means "additional, subsidiary, of secondary importance." He also writes that the pi'el form of the verb progressed from "he plastered" to "he cared for, attended to" (maybe in the medical sense that we mentioned above.) From here we get tipul, metapel מטפל and metapelet מטפלת - "caregiver", particularly for children.
One confusing factor here is that in Aramaic, taflaya טפליא means "children", with tefel טפל meaning "child". However, Klein (and others) say that these words don't derive from our root טפל, but rather are related to the Hebrew taf טף, meaning "children". This leads to the strange scenario where metupal מטופל means both "having many children" (based on tefel) and the child being taken care of (related to tipul). According to Avineri (Yad Halashon p. 330) the former was the more popular understanding of the word, based its usage in that sense in Yiddish. He wrote that piece in 1960, but something likely changed, for I've never heard metupal with that meaning in conversational Hebrew.
Another related word is tapil טפיל - "parasite." Ben Yehudah writes that it was coined by the physician and linguist Aharon Meir Mazia on the basis of the Arabic tufayli - "unwanted guest". Even Shoshan and Klein connect the Arabic word back to the root טפל, but don't explain why (the parasite is attached to the host? the parasite is of secondary importance to the host?). But Arabic dictionaries such as this one connect it to the Arabic cognate of tefel (child), and this book, discussing pre-Islamic Arab culture writes that children were viewed as "nonproductive" and that:
the etymological connection in Arabic between tifl, child, and tufayli, parasite, party crasher, "sponge", is illuminating in this regardAnd if all that wasn't confusing enough, there's another homophone out there. Klein writes that טפל is related to the root תפל also meaning "to smear, paste, plaster". However, there's an unrelated root, also spelled תפל, meaning "to be tasteless, be unseasoned" (this is the source of hatpala התפלה - "desalination"). Klein connects this second root with the Aramaic תפל ( = he talked silly things) and the Arabic tafala ( = he spat). A related Hebrew word is tifla תפלה - "folly" (this is entirely unrelated to tefila תפילה - "prayer".)
As you can perhaps imagine, תפלה as "folly" and טפלה as "of secondary importance" could be mixed up on their own, without even adding the fact that sometimes the tet and tav were switched in either direction. (For an example of the word switching meaning and spelling, see the play on words in Targum Yonatan, Sifrei and Rashi on Devarim 1:1). This page is meant to help Hebrew speakers tell the two roots apart, which isn't easy, particularly in the term emunot tefelot אמונות תפלות - "superstitions" (apparently coined by Krochmal).
Avineri wrote in Yad Halashon (page 216) that he suggested tefela טפלה as the Hebrew word for "by-product", but it was never adopted, probably due to the negative connotation of טפל (the word used today is totzar livay תוצר לואי). This probably also answers my question (in the pashtida post) as to why tefela was never adopted as the Hebrew term for pastry...