When we say that the function of the heart is to pump the blood, what do we mean, exactly? Typically an object’s function is something that confers some good or contributes to some goal: In pumping blood my heart keeps me alive; in grasping objects my hands help me manipulate my environment.
But is that right? Suppose someone designs a sewing machine with a self-destruct button. Pressing the button will never have good consequences for anyone, and no one will ever set a goal that’s furthered by blowing up the machine. Still, it seems correct to say that the button’s function is to destroy the machine.
Another example, from Johns Hopkins philosopher Peter Achinstein: “Suppose that a magnificent chair was designed as a throne for the king, i.e., it was designed to seat the king. However, it is actually used by the king’s guards to block a doorway in the palace. Finally, suppose that although the guards attempt to block the doorway by means of that chair they are unsuccessful. The chair is so beautiful that it draws crowds to the palace to view it, and people walk through the doorway all around the chair to gaze at it. But its drawing such crowds does have the beneficial effect of inducing more financial contributions for the upkeep of the palace, although this was not something intended. What is the function of this chair?”
(Peter Achinstein, “Function Statements,” Philosophy of Science, September 1977.)