In the German language you address other people politely using the capitalised 3rd person plural personal pronoun "Sie", rather than the 2rd person plural "Ihr".
The logic behind the medieval sounding "Ihr" is clear to me, as it keeps the 2nd person while signalising that one's counterpart is in some sense more/bigger than oneself.
However, today's "Sie" seems rather illogical to me. On the one hand because the 3rd person address rather signalises being superior to one's counterpart (as in 'Hat er seine Arbeit schon verrichtet?'), one the other hand because the 3rd person plural could rather mean the big mass of the proletariat, which is kind of the opposite of what "Sie" is intended to mean today.
Therefore I wonder: Why and how has the form "Sie" as today's standard polite address in the German language evolved?