Vir developed its s-less ending from the process of syncope described in Alex B.'s answer to "Why do some 2nd decl. "-er" adjectives and nouns drop the "e" in the stem?": its original form is reconstructed as *vĭros, but in this and many other words an original *-ros was contracted, or sycopated, to r. (Probably via intermediate steps like *-ros > *-rs > *-rr > *-r.) My understanding is that this syncope did not occur when *-ros was preceded by a long vowel; thus, vērus, sērus, mīrus, dīrus, vīrus should be phonetically regular.
I don't know of any strong reason to suppose that this process was irregular in the context of nouns ending in *-ĭros. But that starting point itself doesn't seem to have been common.
I can hardly find any Latin nouns ending in -ĭrus with short ĭ, aside from rare words that look like borrowings such as Semirus (a river name). In borrowings, -ĕrus also may occur without syncope, e.g. Cerbĕrus (from Greek Κέρβερος).
I think the most frequent -ĭrus word is pĭrus, but there are a number of ways to explain why this word would have developed differently from *vĭros. This root of pirus is believed to be borrowed, although I guess the borrowing was fairly old. Wiktionary says the /r/ in Latin pirus/pirum is probably from rhotacism of original *pis- (I guess based on comparison with Greek forms ᾰ̓́πῐον and ᾰ̓́πῐος which would show the Greek loss of intervocalic *s), and it's conjectured that syncope of Latin *-ros was not regular in cases where r comes from original *s. Aside from that, even if pirus had ever met the conditions to be subject to syncope as a regular sound change, I can think of a few reasons why a form like pĭr might get analogically replaced with pĭrus:
- The word is feminine, but second-declension words ending in r in the nominative singular r are pretty much all masculine.
- The word corresponds to the neuter pirum, which obviously does not show syncope, and there could be pressure towards using the form pirus by analogy with other fruit-tree pairs such as pōmum, pōmus; arbutum, arbutus; mālum, mālus.
Compare cedrus and citrus, two other feminine second-declension plant names that end in -rus.
Michiel de Vaan (2008)'s entry on ferus implies that the syncope in vir is regular, while suggesting it did not occur in ferus due to analogy:
The retention of -rus (as opposed to vir < *viros) must be due to the influence of f. fera, n.pl. fera.
(Etymological Dictionary of Latin and the other Italic Languages)
But I find it odd to suppose that fera had a significant influence on ferus, considering that the regular forms ending in -(e)ra of any 1st/2nd adjective in -er evidently did not prevent these adjectives from generally developing syncopated masculine nominative singular forms.
Like de Vaan, Sihler 1994 implies that syncope should be considered the regular outcome for original disyllables with a short vowel followed by *-ros by saying merus and ferus "have not been explained" (New Comparative Grammar of Greek and Latin, §74.4).
On the other hand, Weiss 2009 (cited by Cairnarvon's answer here) argues that the retention of -us in ferus is regular due to it being a disyllable and that the loss of *-os in vir is irregular and caused by analogy to puer "boy", gener "son-in-law", socer "father-in-law" (Outline of the Historical and Comparative Grammar of Latin, Chapter 23 "The Latin Nominal System; the Second Declension", §III. "Case endings", page 221). This hypothesis seems to have been previously espoused by Ferdinand Sommer (Handbuch Der Lateinischen Laut-Und Formenlehre, 1902, page 364).
But I am skeptical that such a common word as vir would have been remodeled based on the forms of these less frequent words, especially since -us was still the most common second-declension masculine nominative singular ending and was found at the end of other words for male family members such as fīlius "son", avus "grandfather; ancestor".
In the end, because there are so few examples of words with the relevant forms, I doubt it's possible to determine with certainty which outcome was regular.
(vir isn't actually quite the only example: there is also an obscure word lēvir/laevir, "brother-in-law", mainly attested in glosses that define what it means, but it is thought that it ends in -vir only because its form was altered by analogy with the word vir. This is the source of the obscure English word levirate. There are also, of course, the actual compounds of vir such as sēmivir, triumvir, etc.)