Why did です eventually overtake なり？


More of a history question... I understand です became more commonly used in
late Edo, but before that (as I understand) it was commonly associated with
low-society life, such as prostitutes and thieves as portrayed by theatre
during the earlier era. So how did one of the most essential grammatical
elements of contemporary Japanese language come to overtake the former
standard?




です did not overtake なり. だ did.

なり is merely a basic connective, "A is B," without any specific implications
for the formality level or politeness of speech. Etymologically, it is a
fusion of に+あり "exists" (where に is not the locative particle, but the 連用形
form of the copula "to be"), thus A, B なり means literally "A, being B,
exists." Later, following the general trend of Japanese that attaching a 連用形
of a verb directly to another verb to denote a sequence gives way to attaching
the verb through the -て-form (all the multiple て-attachments of the modrn
language, like ている, てある, てくる, etc. are very recent), にwas gradually replaced
by its own て-form, にて > で. Thus なり was turned into である [Note 1], shortened to
じゃ or だ.

です is a totally different beast, as it is, forst and foremost, a polite form.
It did not replace なり, but it replaced many of its predecessors, which
frequently co-existed. While Classical Japanese had 敬語, there was no direct
analogue to the current です/ます forms, which do not serve any honorification,
but just state that the whole sentence is polite. Post-Classically, however,
such forms started to emerge. [候]{そうろう} was, I believe, prominent enough in
this position to have a whole style of writing ([候文]{そうろうぶん}) named after it,
and when you attach そうろう to で (analogically to how you attach ある to で in order
to make である), you get でそうろう, which slowly withers down to でそう and then です
[Note 2]. Only in the early 20th Century, when modern literary language was
being formalized, です was chosen above its competitors, such as であります,
でいらっしゃいます, でございます, presumably for being shorter.

[Note 1] あり became ある because of the general phenomenon called "the
final/adnominal merger."

[Note 2] This is not the only hypothesis as to how です was formed, but, in my
opinion, the most probable one. The alternate, namely, that です is short for
であります/でございます and its friends, does not impress me, as all these forms, when
uttered, have a very strong emphasis on the あ in the penultimate syllable, and
it is unclear how could the contract to something with the vowel え.

