May did not win the membership vote, Johnson delivered exactly what tory members wanted and he was a much more convincing candidate compared to Hunt. For their purpose, moral rectitude is not a major factor.
I am pretty sure that whoever wins the PM job is going to stitch up the right wingers...