Change active to passive why did they shut the door??
Why the door was shut by them.
The sentence is in past tense so we use Was with the Door and they changed to them.
Why he broke the table?( Active)
Why the table was broken by him( Passive )