I think S Works used to be their race stuff.
I sort of remember, especially in MTB, that the S Works stuff was race only and slowly the tech trickled down to stuff mere mortals could purchase.
Then in road, there was a top of the line Tarmac, then the S Works. Again, S Works stuff (carbon, design, etc.) trickled down to the regular Tarmac line.
Almost bought an S Works frame but the geo was way too aggressive.
I think S Works is a play on semi factory sponsored privateer race teams.
From motorcycle racing: you got the full on Honda Team using full factory sponsored equipment and personnel, then a privateer Honda Works team using factory provided/purchased equipment.