How did the word "sheer" come to have such different meanings?
There are sheer cliffs
and sheer fabrics
. Why does the same word mean "vertical" in one case and "transparent" in the other? Did they develop from different roots? And what about sheer obstinancy
and the like?
Sheer - Shear itself has actually two different roots.
However, all the examples you have mentioned come from just one of them:
Sheer is a survival of Old English scīr "bright", "shining", which came ultimately from the Germanic base *ski-, source also of English shimmer and shine. Hence for instance the sheer fabrics.
The 'pure' sense also evolves into "genuine" or "intense" and this explains the use in sheer obstinacy.
Similarly it also justifies the use in sheer cliff (steep cliff) because it intensifies the main characteristic of a cliff - how abrupt it is.
The second root of sheer as "swerve" probably originated as a variant of shear, which itself comes from Proto Germanic **skeran*, which also evolved into German and Dutch scheren. And we are back to Proto Indo European **sker-* "cut", which has also produced English score, share, ship, shirt, short, and skirt.