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).
The stroke-signature actually goes back in history as far as to the antique Roman symbols for As and Denarius. (A nice overview of currency symbols may be found at http://www.signographie.de/cms/upload/pdf/SIGNA_GewWaehrZch_... [German].)
[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.