That is not what is happening. This is just the way the entity converter works, the first entity is entity 0, the second 1 etc, it has nothing to do with leading zeros. The target accountProfile.bankAccountType should be a BankAccountTypes and not a string anyway.
Does the code actually work?
Then it was a coincidence. When I saw the html rendered and saw the value populated, I just assumed it was correct, and I just had to understand it. It makes sense to make accountProfile.bankAccountType a BankAccountTypes type... I will try it now.
Thanks for the response.