Are biological "Functions" and "Doings" real in the universe? According to most scientists, "no." They are mistaken manners of speaking. You see, in all of physics, there are only "Happenings," not Functions in the biological sense, in which the function of the heart is to pump blood. Nor are there Doings. Balls rolling down hills are not doing anything at all.
What is the function of your heart? Darwin would answer that it is to pump blood. But your heart makes heart sounds. Why are these causal consequences of beating hearts not the function of your heart? Darwin would answer that you have a heart because it was selectively advantageous for your ancestors to have a heart that pumped blood. Hence the function of your heart is to pump blood, not make heart sounds.
Three points are crucial here: i) The function of your heart is a subset of its causal consequences, here pumping blood, not making heart sounds. ii) A Kantian whole is an organized being in which the parts exist for and by means of the whole and the whole exists for and by means of the parts. You are a Kantian whole, as is a bacterium. iii) You and the bacteria are at a level of complexity where most complex things will never exist in the non-ergodic universe above the level of atoms.
Thus, when Darwin tells us that the function of your heart is to pump blood, he is also telling us why hearts and you exist in the non-ergodic universe.
This last paragraph is the central truth I wish to point to: Once a complex Kantian whole exists in the non-ergodic universe above the level of atoms, we can legitimately discriminate the causal consequences of the parts that help sustain the Kantian whole from causal consequences of the same parts that are mere side effects.
The former causal consequences, here the heart pumping blood, are the legitimate Functions of the parts, and are no longer mere Happenings. Functions of parts help explain why complex Kantian wholes exist in the universe above the level of atoms.
Physics has only Happenings. Why in biology are Doings not just Happenings?
I think the right answer is that Doings are causal consequences of Kantian wholes, like a bacterium swimming up a glucose gradient "for food," that are therefore functional behaviors that help sustain the complex Kantian whole.
But there is a further step. In classical physics one has both causal closure, i.e., all events have sufficient causes, and in physics in general, what "happens" is entailed by laws.
But as Giuseppe Longo, Mael Montevil and I argue in a paper now on ArXiv, entitled "No entailing laws, but enablement in the evolution of the biosphere," evolution is not entailed. There are, if we are right, no entailing laws for the becoming of organisms in the biosphere. Thus there are no entailing laws for the evolutionary emergence of causal consequences which help sustain complex Kantian wholes in the non-ergodic universe. Hence, those causal consequences, now Functions, arise beyond entailing law.
Once the heart has emerged in evolution, there may or may not be a lawful reductive account of how it "works." But no law entails the coming into evolutionary existence of the Function, the heart pumping blood, as a new function.
Functions and Doings, arising beyond entailing laws, are legitimate aspects of the living world.