Actually, that's because the very purpose of marriage is reproduction, and you can't do that if impotent / without sex.
But yes, inability to perform makes the marriage void.
By canon law, sterility is a disqualifier if it had been concealed from the other side. Otherwise it is permitted, but...