To my understanding, all systems have a function. For instance, the function of the respiratory system is to supply oxygen to the body. The function of the digestive system is to break down and disseminate nutrients. The function of a mass transit system is to facilitate large scale public transport.
Capitalism is defined in Merriam-Webster as,
an economic system characterized by private or corporate ownership of capital goods, by investments that are determined by private decision, and by prices, production, and the distribution of goods that are determined mainly by competition in a free market
So clearly, capitalism is a system, but I can't glean from that definition its purpose.
What would most economists consider the function of capitalism?
Please be clear to separate, if you will, this system's function from the functions of other economic systems in your answer.