This comes from two directions One is his high respect for Physics and the Metaphysics of Aristotle and Plato and Plotinus and this learning being the fulfillment of the mitzvahs to love and fear God.
But also what dismayed people was the natural law concept of the Rambam which he in fact does not spell out but which hearkens back to Aristotle and Plato's discussion about justice and human good.
If anything the Rambam had to be thinking of Aristotle's' political system of Aristocracy as natural law, not democracy nor Sparta's system.
HOWEVER-it is easy to confabulate and confuse this with the actual political systems of Athens and Sparta. In fact just the opposite. The Rambam places the Nomoi (laws) of the Greeks in the same category as the raving mad speculations of the Sabians.
As Sunwall puts it: "Although the ancient republics, on the whole, ended rather badly, as indeed modern studies of public choice would tend to predict, modern interpretation persists in seeing deliberative legislation as completely different from, and qualitatively superior to oracular law, judicial astrology, and the political use of divination.
It is precisely this distinction which Maimonides, in linking the "nomoi of the Greeks" with the "ravings of the Sabians" refuses to admit. Although as a rationalist, Maimonides makes a clear psychological distinction between reason and the imaginative faculty, he calls into question, by linking the Greeks and the Sabians, whether deliberative acts of legislation (nomoi) are entirely rational. For Maimonides an essential attribute of rationality is its transhuman quality. Unlike mathematics, but rather similar to poetry and other imaginative productions, legislation is clearly the result of the exercise of human will. Thus in a broad sense idolatry and legislation can both be seen as works of the human imagination. Therefore the Greeks and their nomoi can be grouped together with less obviously rationalistic cultures, not on the superficial basis that the Greeks used an elaborate iconography to represent the divine, but because their institutions like those of other pre-monotheistic cultures, were the result of arbitrary human innovation."
Appendix: The idea of the Rambam of the Physics and Metaphysics is in a few places in the Guide and Mishe Torah but the most famous is the parable of the king. In this parable there are many levels of closeness with the king. The lowest level is people outside of his country. The next level is people in the country. Then people in the capital city. Then people near the palace. Then people in the palace. Then people in the inner parts of the palace. This is a parable concerning God. People outside the country are the barbarians. People in the country and in the capital city have natural law. People around the palace are people that keep and learn the Oral and Written Law. People inside the palace are the Physicists. People in the inner corridors of the King are the prophets and Philosophers.
You can see how this parable would have bothered many people