Putatively attributable to Aristotle (or one of his pupils) the term comes to us from their idea of household management. In this sense, all economics can be said to be home economics (inasmuch as the world is our home.) The purpose of studying the ways and means of managing such a home can be as trivial as studying for the sake of studying. Unstudied, however, it is arguable that the home would not be as hospitable.
In the sense of "wealth and resources of a country" the purpose of economics is in the application of knowledge obtained by studying the production, consumption and distribution of wealth to such concerns of State as policy, taxation, welfare, et cetera. In this sense as well, survival is certainly a purpose economics.
As far as economics seeks to answer questions of how to best manage my home, it can be said to have an ethical purpose.
As far as economics are used as a "science of wealth" it's function can be said to be in service of social engineering.
That said, economics has no purpose - it has no agency. It is simple a field of study.
Per "What is an Institution?" published in the Journal of Institutional Economics:
Economics as a subject matter, unlike physics or chemistry, is largely concerned with institutional facts. Facts about money and interest rates, exchange and employment, corporations and the balance of payments, form the very heart of the subject of economics.
...most of the phenomena we discuss in economics, such as money, financial institutions, corporations, business transactions, and public offerings of stock are all observer relative. One can say that, in general, the natural sciences are concerned with observer independent phenomena and the social sciences with observer relative phenomena. ...
Economists typically believe in models. In my experience in dealing with economists, they often talk about ‘your model’ as if one were not trying to give a factually accurate theory about the real world but to construct a model. And, indeed, of course, in classical economic theory one typically does construct models. One makes a set of assumptions about entrepreneurs trying to maximize profits and consumers trying to maximize utility, for example, and then one deduces certain conclusions. To the extent that the assumptions are true, the conclusions will be substantiated. To the extent that the assumptions are only partly true, or allow for all kinds of exceptions and interferences from outside the assumptions, then the applicability of the model to the real world will be to that extent limited. Economists in general are not worried by these limitations, because they think that as long as the model has important predictive powers, we need not worry about whether or not it is literally true in its details.
This methodological approach can be useful for lots of purposes, but it has impeded understanding of my own views. I am not trying to construct a model; I am trying to advance a theory that states an important set of facts about how society actually works. Just as when I say I have two thumbs, that statement is not a ‘model’ of my anatomy but a literal statement of fact, so when I say institutions generate status functions, that is not a model but, if I am right, it is a true statement of fact. It is not a case of constructing a model that ignores all sorts of complicating details.
Economists, in my experience, typically confuse thought experiments with empirical hypotheses. Here is an example that has come up over and over. I point out that there are desire-independent reasons for action. A classic case of this is promising; when I make a promise to do something, I have a reason for doing it which is independent of my desires. When I point this out, economists often say, ‘Yes, but you have all sorts of prudential reasons why you would keep your promise; if you did not, people would not trust you, etc.’ These are familiar arguments in philosophy, but they miss the point. One way to see that they miss the point is to construct a thought experiment. Subtract the prudential reasons, and ask yourself whether I still have a reason for keeping the promise. The answer is not an empirical hypothesis about how I would behave in a particular situation, rather it is a thought experiment designed to show the conceptual distinction between my prudential reasons for acting and the desire-independent obligation that I recognize when I recognize something as a promise that I have made. The point is that I am not making an empirical prediction about how I would actually behave under certain circumstances, rather I am giving a conceptual analysis where the concept of a prudential reason is a different concept from the concept of a desire-independent reason. The concept of promising, by its very definition, contains the concept of a desire- independent reason. To recognize something as a valid promise is to recognize it as creating an obligation, and such obligations are desire-independent reasons for acting.