The Bible never said we had to be perfectly good, only faithful. God would provide the perfect, we need only believe.
Lot believed and had faith but let his lusts pull him away from God. However, when Lot had to make a choice, he made the right one.
Aye, Laddie. 'Tis the bottom line.
We'll plead our cause at the bar of God,
We poor lost souls for whom Christ died.