Sorry it has been such a nightmare coming home.

They take the passports to get the visa required to enter Qatar so they can transfer you to the hotel. . This way you do not have to stand in a line while the visa is being processed. Perhaps that was not explained to you but this is always the way it is done.