Does the “s” at the end of “söndags” come from some genitive form? Like “söndags dag”? And why on earth is “i söndags” only used to refer to the previous Sunday? (I assume that the next Sunday is referred to as "på söndag…)
The genitive after i is a remnant from the old days, when the language had four cases, with different prepositions requiring different cases, similar to modern German. The same goes for genitive after “till” in some set expressions: “till sjöss”, “till fots”, etc.
I don’t know why, but it prevents a lot of misunderstandings.