There are some alternative theories on this, too. The one I learned was the sign being derived from the Pillars of Hercules (two vertical bars) with a banner (the "S") wrapped around it, reading "[non] plus ultra", as adopted by Charles V for the Spanish coat of arms and later stamped on the reverse of Spanish dollar coins.
[Edit:] There's actually a bit of irony in this, considering the Pillars of Hercules were marking the end of the world (as lined out by the banner "non plus ultra") and the minted silver coming from the New World beyond ...
It is not the case, I'm sorry to say, although that is certainly a commonly-repeated story. (There's a similar urban legend in Brazil involving the Pillars of Heracles and the meandering route used by Tariq ibn Ziyad.) But the textual evidence (years and years of preserved handwritten merchant communications from multiple nations and colonies on both sides of the Atlantic showing a clear progression from PS to a $) is very much in favor of the superimposed PS.
Personally, I would think there's some kind of inheritance from the older Lira (later pound) sign "£". Remarkably, this one is also coming in two variants, both with a single and a (probably older) double stroke. (Unicode U+00A3 and U+00A4 respectively.) A letter with a horizontal or vertical stroke became somewhat of a universal signature of a currency symbol (think of cents, Yen, &c).
[Edit:] Also, consider the former predominance of the version featuring two distinctive vertical strokes, as lined out in https://news.ycombinator.com/item?id=9018366 . A "P" with a doubled vertical stroke would just make a (mirrored) paragraph sign. But I confess not to know, what the original version would have been (single or double stroke).
[Edit:] Another hint on "$" not being derived from the letter "S" might be the significant smaller vertical extent of the "S"-like part than the ones of capital letters, both raised from the baseline and smaller than the X-height.
I wouldn't contest this (a pesos being a piece of eight or a Spanish dollar). I would muse, given a 1700 years history of currency symbols denoted by a letter with an extra stroke (or, in some rare cases, as a letter with a hook, like the Florin), it would be a bit strange that the sign for the pesos/dollar would have originated in a totally independent evolution of its own. (The octopus eye of currency symbols?) It seems more likely that a proper sign with a stroke was sought for and the reverse of the coin would have been of some assistance. The "Ps" would have been a different usage, like the concurrent use of "ƒ" and "Fl" for Florin/G(o)ulden, non-withstanding mixed interpretations. (But this is just my opinion.)
http://en.wikipedia.org/wiki/File:Columnas_Plus_Ultra.png
http://en.wikipedia.org/wiki/Spanish_dollar
[Edit:] There's actually a bit of irony in this, considering the Pillars of Hercules were marking the end of the world (as lined out by the banner "non plus ultra") and the minted silver coming from the New World beyond ...