In passive form object becomes a subject.Is it right?

So why is John is the subject in"John was chosen captain of the team".Isn't John is a object?I don't understand.Please explain it

In an ACTIVE sentence, the subject does the action.

In a PASSIVE sentence, the subject receives the action.