October is the tenth month of the year in the Gregorian calendar, which is the calendar system used by most of the world today. While the name “October” suggests that it should be the eighth month of the year, there are historical reasons why it is not.

The original Roman calendar, which was used during the early days of the Roman Republic, had only ten months. These months were named Martius (March), Aprilis (April), Maius (May), Junius (June), Quintilis (July), Sextilis (August), September, October, November, and December. The year began in March, and each month had either 29 or 31 days.
However, this calendar system had some significant flaws. Because the calendar was based on the phases of the moon, it did not align with the solar year, which is the time it takes for the Earth to orbit the sun. As a result, the calendar gradually drifted out of sync with the seasons, causing confusion and inconvenience.
In 46 BCE, Julius Caesar introduced a new calendar system, known as the Julian calendar, which was designed to better align with the solar year. The Julian calendar had twelve months, and each month had either 30 or 31 days, with the exception of February, which had 28 days (or 29 days in a leap year). The year began on January 1, and each month was given a number based on its position in the calendar.
Under the Julian calendar, October was the eighth month of the year, as its name suggests. However, in the year 1582, the Julian calendar was replaced by the Gregorian calendar, which is the calendar system used today in most of the world.
The Gregorian calendar was introduced by Pope Gregory XIII in order to correct the drift of the calendar and bring it back into alignment with the solar year. One of the changes made by the Gregorian calendar was the addition of leap years, which occur every four years (with some exceptions). Leap years have an extra day, which is added to February in order to keep the calendar in sync with the solar year.
In order to transition from the Julian calendar to the Gregorian calendar, ten days were skipped in October of 1582. This means that the day after October 4, 1582, was October 15, 1582. This adjustment was made in order to bring the calendar back into alignment with the seasons, and to ensure that the spring equinox occurred on March 21.
After the adjustment, October remained the tenth month of the year, even though its name suggests that it should be the eighth. The same is true for the months of September, November, and December, which are named after the Latin words for seven, nine, and ten, respectively.
In conclusion, October is not the eighth month of the year because the calendar system has changed over time. While the original Roman calendar had only ten months, the current Gregorian calendar has twelve months, and October is the tenth month. The discrepancy between the name and the number of the month is due to the historical changes in the calendar system, including the transition from the Julian calendar to the Gregorian calendar.