In your example sentences as is a conjunction.
As
(conjunction) In the same manner or way that:
Example -
Think as I think.
As a conjunction as introduces a clause that is sometimes inverted. There as mean so or likewise.
He went to military school as did his friend. [= He went to the military school, his friend also went there.]
Your example sentence -
It was no longer possible to enter the temple, for it had filled with rubble years ago, but they admired the exterior, as [did all the tourists] (that) Mr. Kapasi brought there, slowly strolling along each of its sides.
Here as introduces the clause - [did all the tourists]
did means admired here.
But you might be thinking why in that subordinate clause - [did all the tourists] - the subject-verb is inverted.
There are reasons. Firstly it sounds better that way, and secondly it's to keep the antecedent of that - the tourists - close to that-clause - (that) Mr. Kapasi brought there.
Your second sentence -
He plays the piano as does she. [= Both of them play piano]
But the non-inverted version means something different.
He plays the piano as she does. [it might mean the same as above or this - He plays the piano the same way as she plays]