@evoskuil
https://files.esotericnonsense.com/public/base58.txt
I think I see now, base58 is analogous to decimal string serialization, and the "1" character is used as zero.
As you go through the input - which is viewed as a number - you're serializing in an order from right to left, and,
the definition of reaching the leftmost point is that your DIV 58 and MOD 58 suddenly give ZERO!
..at which point you STOP SERIALIZING
So the reason you don't get any leading "1" char as significant base58 data is exactly that, that a leading "1" means "serialization is over".