"Did you then think that We had created you in vain," meaning: without resurrection or reckoning, "and that you would not be returned to Us?" This is posed in the interrogative form, meaning: You had thought that, but We did not create you in vain; We only created you for resurrection and reckoning.