You are curious why an "S" with a line through it is the sign of the dollar. Where did the cash sign "$" (or dollar symbol) originate?
It is not clear, but it appears to have something to do with Spanish coinage with "pesos" meaning "pieces" and an abbreviation would be "ps". In smaller coins or on containers, this abbreviation may have been jumbled or pushed the individual letters together closely. The vertical line may have been prominent on a regular basis over the "S." This "ps" abbreviation may have morphed into a "$" sign and eventually recognized as the symbol of money/cash. But there are other theories.
Atlas Shrugged by Ayn Rand suggests it came from the abbreviation of the United States (with the prominent vertical lines of the "U" being overlayed upon the "S"). This origin seems dubious.
See the below links for further information: