"A dress is getting torn"
In various online sources I found gauni classified as class 9 with the i-na prefix and unchanged plural (gauni) or as class 5 with the li-na prefix (plural magauni). The infix -w- makes the sentence passive (someone is doing sth to the gown) while -k- denotes a state (e.g. of being torn) with no focus on the doer. I am thinking this could be similar to the difference between The Sun melts the snow and The snow melts.
as far as i can tell, it's not really a "rule" so much as a derived term. it doesn't make sense for all verbs, the "-ka" prefix does have meaning as a stative tense indicator, but you just have to know which verbs are commonly used with it or not. see https://en.wiktionary.org/wiki/Appendix:Swahili_verbal_derivation#Stative