I will give you my educated guess, although I cannot be certain, since I haven't found any documentation on it.
I suppose that it was to help readers in the older days, when words were not separated by spaces and there were no punctuation marks. Thousands of words were written attached, one after the other. The different form of sigma helped indicate the end of word.
---------------------------------------------------------------------------------------------------------------------------
Vasiliki Baskou, Instructor/Director, https://learn-greek-online.com.