That question would be best answered by Shaw himself, who is dead, of course.
I suppose he meant that virtue was an "institutional practice" governed by the regulations of marriage. If true, then that means Shaw didn't think that people were virtuous out of any personal commitment, but rather because the "rules" of marriage required them to behave virtuously.
Knowing what we do about Shaw, that was undoubtedly a subtext of the quote. But the context (including the fact that it is spoken by Don Juan, in Hell no less) suggests a simpler immediate meaning: The specific "virtue" that Don Juan is referring to is in Doña Ana's statement that an unmarried mother is "less virtuous" than a married one. He's dismissing conventional sexual mores as a contrivance created by conventionalists for the purpose of enabling them to condemn libertines like himself.
I would also say that the "virtue" in question is "virginity, celibacy, not being allowed to have sex outside of marriage." Married people who are allowed to have sex may recommend that other people must not have sex, but it doesn't seem very fair.