The spheres were assumed to be "in heaven" and anything in heaven could only be perfect, which is what spheres are.
Potlemy's real contribution was to affirm the old World Order by creating a set of mathematical formulae that predicted the orbit of any of the observed celestial bodies at any time and gave birth to modern navigation.
The beauty of Ptolemy's success is that is ti based on a false premise, and earth being flat was not it.
Ptolemy's system was based on the model that has the earth at the center, and everything else (including the Sun) in orbit around us.
This scientific model only reinforced Aristotle's "explanation' why things fall on earth, i.e. gravity ("because things fall towards the center") and the Church teaching that man and earth are God's central creation.
Here we have science, philosophy and religion converging and reaching the same (independent) conclusion. This is how we nowadays come to "truth." The convincing power of three most important fields of knowledge of that time established an order of truth that was almost unshakable, even when presented with clear-cut evidence to the contrary.
Actually, you sell old Ptolemy short.
The model of the earth at the center is simply choosing the frame of reference fixed on a terrestrial observer. It is neither true nor false in that light, but it is the coordinate system you need to, for instance, drive a terrestrial telescope to keep a planet in view.
The frame of reference fixed on the sun gives better coordinates for calculations of planetary motion in that the center of the sun is approximately (to very high accuracy) the center of mass of the solar system. Again it is neither true nor false, just a choice of coordinates.
If you want to drive a terrestrial telescope, you still have to convert from the Copernican coordinates to the Ptolemaic coordinates, the telescope has to follow those little epicycles, after all.