In medieval thought, philosophy is the so-called "handmaiden of/to theology (the queen of all sciences)" to use the translated words of Thomas Aquinas --- a late medieval theologian/philosopher. The reason that theology was so "big" in the middle ages was because after the "fall of Rome" and so-called "dark ages of Europe", the only European people, initially, to have a small amount of leisure to "do philosophy" were Christian monks --- particularly the Benedictine monks . Later, mendicant monks [Franciscans and Dominicans] continued and developed the Christian traditions of philosophical theology, while some members of the feudal “nobility” also read philosophical works.
Simultaneously, the Muslim conquest of Abu Bekr (573–634), after Mohammed’s death, spread Islam through-out the Mediterranean Levant, North Africa and up through Spain to the Pyrenees mountains where early medieval Frenchmen stopped their advance. Similarly to Benedictine monks, there was leisure in the increasingly wealthy Muslim Caliphates to also do philosophy in order to justify and rationalize Mohammed’s Koran --- which was initially (in early Muslim Caliphates) a dangerous pastime (Abu Beker had actually burned all sorts of works of the library in Alexandria to heat bath water). But in later Caliphates philosophy was more indulged/allowed. But again philosophy had to be in the service of theology in Muslim “theocratic” Caliphates. Sceptical philosophy was a major “no-no”!
And after the diaspora of Jews, caused by Titus’s Legions destroying ancient Judea, along with The Temple, at Jerusalem some scattered Jewish scholars also studied and did philosophy in both Europe and Muslim Caliphates, to support their understanding of both the world and the Old Testament or Torah. Moses Maimonides is one famous Jewish example. Averroes and Avicenna (Latinized names for Islamic scholars philosophers) are 2 famous medieval Islamic scholars/philosophers/theologians.
What were people contemplating? (besides their religious books in the middle ages). They were actually contemplating what Aristotle talked about long prior to the middle ages, to wit:- The mathematical sciences [Arithmetic, Geometry, Astronomy/(astrology)] also called "immoveable numbers and figures" (astronomy or astrology excepted) "abstracted from matter". Then they contemplated "moveable objects", which is the subject of PHYSICS. Finally the ancients called the 3rd philosophical "science" METAPHYSICS (primary philosophy) which had "God/Theos/Zeus" as its highest object --- which, of course, became RELIGION and YHWH/Adonai for Jewish people, God/Deus for Latin speaking Europeans and Allah for Muslims.
Here is the way a very sophisticated later medieval philosopher spoke of theology in relation to other sciences of the time. Sciences which are still "in vogue" (e.g. Geometry) today:
Article 2. Whether sacred doctrine is a science?
Objection 1. It seems that sacred doctrine is not a science. For every science proceeds from self-evident principles. But sacred doctrine proceeds from articles of faith which are not self-evident, since their truth is not admitted by all: "For all men have not faith" (2 Thessalonians 3:2). Therefore sacred doctrine is not a science.
Objection 2. Further, no science deals with individual facts. But this sacred science treats of individual facts, such as the deeds of Abraham, Isaac and Jacob and such like. Therefore sacred doctrine is not a science.
On the contrary, Augustine says (De Trin. xiv, 1) "to this science alone belongs that whereby saving faith is begotten, nourished, protected and strengthened." But this can be said of no science except sacred doctrine. Therefore sacred doctrine is a science.
I answer that, Sacred doctrine is a science. We must bear in mind that there are two kinds of sciences. There are some which proceed from a principle known by the natural light of intelligence, such as arithmetic and geometry and the like. There are some which proceed from principles known by the light of a higher science: thus the science of perspective proceeds from principles established by geometry, and music from principles established by arithmetic. So it is that sacred doctrine is a science because it proceeds from principles established by the light of a higher science, namely, the science of God and the blessed. Hence, just as the musician accepts on authority the principles taught him by the mathematician, so sacred science is established on principles revealed by God.
Reply to Objection 1. The principles of any science are either in themselves self-evident, or reducible to the conclusions of a higher science; and such, as we have said, are the principles of sacred doctrine.
Reply to Objection 2. Individual facts are treated of in sacred doctrine, not because it is concerned with them principally, but they are introduced rather both as examples to be followed in our lives (as in moral sciences) and in order to establish the authority of those men through whom the divine revelation, on which this sacred scripture or doctrine is based, has come down to us. [Summa I Q. 1. Article 2.]
Thus the allegedly "scientific" nature of Theology which Aquinas calls Sacred Science or Sacred Doctrine.