"a faulty functioning, a failure to function as expected," 1827, from mal- "bad, badly, wrong" + function. As a verb, "to fail to function normally or as expected," by 1888. Related: Malfunctioned; malfunctioning.
word-forming element of Latin origin meaning "bad, badly, ill, poorly, wrong, wrongly," from French mal (adv.), from Old French mal (adj., adv.) "evil, ill, wrong, wrongly" (9c.), from Latin male (adv.) "badly," or malus (adj.) "bad, evil" (fem. mala, neuter malum), from Proto-Italic *malo-, from PIE *mol-o-, probably from PIE root *mel- (3) "false, bad, wrong."
Most Modern English words with this element are 19c. coinages. It generally implies imperfection or deficiency, but often it is simply negative (as in malfeasance, malcontent). It is equivalent to dys- and caco- of Greek origin and Germanic mis- (1).
1530s, "one's proper work or purpose; power of acting in a specific proper way," from French fonction (16c.) and directly from Latin functionem (nominative functio) "a performance, an execution," noun of action from funct-, past-participle stem of fungi "perform, execute, discharge," from PIE *bhung- "be of use, be used" (source also of Sanskrit bhunjate "to benefit, make benefit, atone," Armenian bowcanem "to feed," Old Irish bongaid "to break, harvest"), which is perhaps related to root *bhrug- "to enjoy." Meaning "official ceremony" is from 1630s, originally in church use. Use in mathematics probably was begun by Leibnitz (1692). In reference to computer operations, 1947.
Others are reading
<a href="https://www.etymonline.com/word/malfunction">Etymology of malfunction by etymonline</a>
Harper, D. (n.d.). Etymology of malfunction. Online Etymology Dictionary. Retrieved $(datetime), from https://www.etymonline.com/word/malfunction