In the order of the mishnayos, Maseches Sotah follows Masaeches Nazir. The Talmud explains that this is based on the pesukim in parshas Naso, where the parshiyos of nazir and sotah are next to each other. The reason for the juxtaposition is explained by the Talmud as follows: normally the Torah does not want us to be extreme. The middos are referred to as such because each must be implemented with the proper measure (the Hebrew word "middah" means a measure). One who accepts upon himself to become a nazir, i.e. to become, in a certain sense, an ascetic, and to totally abstain from wine, is considered a sinner. However, once in while we consider a nazir to be a kadosh - a holy person. One who lives in a generation (like ours) where there is much corruption and pritzus, and one who witnesses a sotah, must be concerned that he too may follow the path of the corrupt society. Under such circumstances the Torah recommends that we take extreme measures to offset the improper influence of society.
The Rambam is famous for his presentation of this idea in Hilchos De'os. One of the modern Jewish thinkers has attacked the Rambam for having picked up this concept from the Greek philosophers and presenting it in Mishna Torah, as if it had a source in Talmudic literature. But the truth is that it is rooted in the rabbinic comment regarding the juxtaposition of the two parshiyos of nazir and sotah.
We live in a generation of instant communication. Everyone around the world is notified immediately about all the ganovim and all the sotos anywhere in the world. We do not just see one sotah, rather we are made aware of many sotos. Although under normal conditions it would not be healthy to follow an extreme path in life, in our circumstances extreme measures are recommended.
This recommendation is true not only in the area of bein adam laMakom, but also in the area of bein adam lachaveiro. We are surrounded with many who cheat in business, cheat on income tax, sales tax, etc. We should be careful not only to be honest and follow the law, but even bend over backwards to make sure that we don't follow these extremely improper practices of our society. The Talmud describes kosher fish as having a backbone, and having the ability to swim upstream, i.e. against the current. Jews must always develop such a backbone and see to it that they swim against the current.
The Rambam interprets the mishna in Pirkei Avos as recommending yet another exception to "the golden rule." The Tanna Rabbi Levitas of Yavne used to say, that one should always be "very very" humble. The Rambam interprets the repetition of the term "very" to imply that one ought not to follow the golden mean with respect to arrogance and humility, but should rather go to an extreme in adopting the quality of humility.
The Rambam explains that biblically humility and arrogance should be the same as any other middos and one should attempt to follow the middle path, but just as the rabbis introduced so many gezeiros and harchokos in the area of bein adam laMakom and bein adam lachaveiro, so too here did they introduce a gezeira in this area of bein adam le'atzmo. The rabbis were concerned that many people, or perhaps most people, would not be able to determine where the midpoint is between arrogance and humility, and would most probably err on the side of arrogance. Therefore the rabbis made a gezeira derabanan that we must all go to the extreme regarding humility.