Scene 1: Wizard casts a spell to find out pure hearts.
Scene 2: Dr Sivana comes to take the Eye of Sin. and one of the seven sins utter that the wizard is very weak and won't/can't stop him.
Scene 3: When Billy is summoned by the wizard (or the tracker spell automatically summons the potential chosen ones, I don't know) the Eye of Sin was gone and wizard literally turned into ashes after he passed on his power to Billy.
These scenes put up (dominantly) that wizard was just putting his faith on the purity of the kid in front of him, as there was no more time left for looking other candidates.
Oh hey! this can be example for kids to write in tests as an example
for "being at right place at right time"
This Reddit post (Can someone explain to me why the Wizard gave Billy Batson, a kid, the powers and responsibility of being Shazam?) & this Looper post (What does it meant to be pure of heart exactly?) Also suggest the aforementioned theory.
Now I don't think there is any explanation available on this, as there are too many variables (questions) floating around. Was Billy the first to get summoned after Sivana took the Eye? Why did Wizard turn to ashes, was that meant to be regardless him giving powers to someone? and so on...
So overall my conclusion is: Wizard was running out of time & Billy was his (potential) pure heart candidate.