The sun and planets follow the ecliptic, an imaginary plane in the celestial sphere tilted approximately 23.5 degrees relative to the celestial equator. Earthbound observers see the sun and planets move along the ecliptic arc, rising up from the east and setting in the west.
Because the Earth's axis inclines 23.5 degrees relative to its orbit around the sun, the apparent path of the sun and planets follows the ecliptic, while the stars appear to move along fixed paths. This incline relative to the sun provides Earth with its seasons and explains why some stars only appear at certain times of the year relative to Earth's orbit around the sun. The sun and planets' motion along the ecliptic eventually led astronomers to speculate that the solar system formed from a disk of matter orbiting the sun that cooled and eventually formed the planets.
The celestial sphere originated with ancient astronomers who saw the stars moving along a fixed path. They imagined a crystal sphere studded with stars that rotated relative to Earth. After Copernicus, it became apparent the Earth moved and the stars remained fixed. The celestial sphere evolved into a convenient coordinate system for astronomers, since the relative distances and paths of stars appears fixed.