Philosophy was first accomplished as a discipline in Ancient Greece. Before Philosophy, practically all populations around the world tried to explain what happened around then through myths. The first person who attempted to explain all the phenomena of nature without alluding to gods or legends was Tales of Mileto. After him, many philosophers tried to explain nature according to the elements already present in experience, or using metaphysical entities such as mathematical objects, notions of the soul, the forms, etc., anything that could explain rationally the existence of the universe and why it behaves the way it does. These were called the ancient cosmological philosophers, who presented different models of the universe and diverse explanations of how it came to be.
Also, during this time questions were formulated in the pure abstraction about the being of things. The first philosophers to ask this question were probably Parmenides of Elea, Zeno of Elea and Heraclitus. Along with the Socratic questions about what is good and beautiful, Plato and Aristotle elaborated on the nature of the being of things.
It was during all this process that perhaps Aristotle for the first time saw what Philosophy was all about. It is the discipline that looks for the first principles of knowledge, of what is good and true. This implied that the philosopher was not focused on the individual or the particular arts, but he only dealt with the theoretical realm of the first principles from which everything else is legitimized. This is a realm of abstraction, and since these principles are dealt separately from the realm of the senses, philosophy turns out to be the most difficult and most exact of all sciences.
Wisdom [sophia] is thought to consist in theoretical rather than in productive kinds of knowledge. Clearly, then, wisdom is rational knowledge concerning certain basic factors and principles. [. . .]
First, we assume that the wise man knows all so far as possible, though he does not know anything in particular. Next, what he is wise who understands difficult matters, matters which is not easy for most men to understand; whereas sense perception is common to all, and therefore easy, and not a mark of the wise man. Next, we assume that he who is more accurate and more able to teach the reasons why is the wiser in the particular science. [. . .] (Aristotle 982a)
Now, Aristotle emphasizes that Philosophy is not productive in a lucrative sense. It is a discipline that has its own merits:
That this science [philosophy], moreover, is not one of production is clearly illustrated in those who first began to philosophize. For it was their curiosity that first led men to philosophize and that still leads them. In the beginning, they were curious about difficulties close at hand. Then they progressed little by little in this respect and raised difficulties about matters of greater consequence; for example, about behavior of the moon and the sun and the stars and of all becoming. But whoever is perplexed and wonders thinks himself ignorant. Hence, even the lover of myths is in a way a lover of wisdom [philosopher]. Therefore, inasmuch as men philosophized in order to escape ignorance, it is evident that they learned in the pursuit of knowledge, and not for some useful end. This is attested also by the fact that it was only after all the necessities for commodious and enjoyable living had become common that this sort of intelligence began to be sought. Clearly, then, we do not seek it for any other use; but, as we say that a man is free whose aims are his own and not another's, so we pursue this knowledge as the only one of the sciences that is free, since it alone is for its own sake (Aristotle 982b).
This is the reason why Aristotle considered Philosophy a divine discipline, since Philosophy deals with the first principles, and God is the first cause of all things:
Hence the acquisition of this knowledge may with some justification be regarded as not suited to man. For human nature is in many ways servile: so that, according to Simonides, God alone may have this prerogative; and it is fitting that a man should seek only such knowledge as becomes him. [. . .] For the most divine knowledge is also most worthy of honor. This science alone may be divine and in a double sense: for science which God would most appropriately have is divine among the sciences; and one whose object is divine, if such there be, is likewise divine. Now our science has precisely two aspects: on the one hand, God is thought to be one of the reasons for all things and to be in some sense a beginning; on the other hand, this kind of science would be the only kind of the most appropriate kind for God to have. All other sciences, then, are more necessary than this; but none is more excellent (Aristotle 982b-983a).
In other words, Philosophy is not a field that is productive in the lucrative sense. In fact, in this sense Philosophy is useless. However, it is a discipline which is an end in itself, and its merits lie on the fact that through the discovery of the first principles, all other sciences have meaning.
Philosophy has evolved significantly from ancient Greece, through Roman philosophy (Cicero, Seneca), Medieval Philosophy (St. Augustine, St. Anselm, Pseudo-Dionysus, St. Thomas Aquinas), Modern Philosophy (Nicholas of Chusa, Giordanno Bruno, René Descartes, John Locke, Berkeley, Hume, Immanuel Kant, Hegel, Marx among others), Continental Philosophy (Friedrich Nietzsche, Edmund Husserl, Merlau-Ponty, Karl Jaspers, among others) and Analytic Philosophy (Gottlob Frege, Edmund Husserl, Rudolf Carnap, W. V. O. Quine, Hilary Putnam, Paul Benacerraf, A. Tarski among others). Other branches deal with all the problem of knowledge (Epistemology) and science (Philosophy of Science), the problem of beauty (Esthetics), the problem of those actions which are good in themselves (Ethics), the problem of Law (Philosophy of Law), the problem of the principles that must govern any system of government (Philosophy of Politics), the problem of the legitimacy of religion and the belief in God or an afterlife (Philosophy of Religion), etc.
As Aristotle well stated,
philosophy as a
discipline is not a lucrative discipline, but must be loved and
it helps to reason and ask why society exists, why does it structure in
certain way, is society right in doing generally what it does,
why of all the disciplines, it's the most excellent.