When did Astarion become a rogue?

I didn’t come to BG3 w any D&D background. Apologies if this is a silly question. If Astarion used to be a magistrate for a living, isn’t it unlikely that he was a rogue all along? Did he pick up the class out of necessity after he became a vampire spawn? I would love to hear your thoughts and related D&D insight on how class selection works—is this question a gray area where character creation and story would fill the gaps?