Two, not necessarily mutually exclusive explanations have been offered:
The first explanation was offered by Cicero, who believed that the normal word order of cum n?b?s "with us" would sound too much like cunn? b?s "twice in the cunt", so the words were reversed. This reversal was then applied to cum v?b?s, cum m?, cum t?, and cum s?.
A modern explanation is that the word ordering comes from the fact that in Proto-Indo-European the word *?óm (from which cum derives) was an adverb, not a preposition as it became in Latin. As such the *kom could appear before or after the object pronoun since it was the object of the verb, not the object of a preposition. As these special particles evolved into prepositions this word order became archaic even though it was still commonly used. Thus the contraction n?b?scum (and m?cum, etc.) evolved into an adverb in its own right.
m?cum (not comparable)