Let us recall first of all that Matthew's audience was mainly Jews, and only Matthew's Gospel has this exception clause.
The word "adultery" is not what Jesus said, although many Bible translations use this word. If Jesus intended to say adultery, he would have used the word moicheia, meaning "adultery," but instead he used the word porneia, meaning illicit or invalid.
His audience, the Jews, knew exactly what Jesus meant. Leviticus 18:6-16 list marriages that are illegal for Jews because they are between certain degrees of consanguinity or were with a Gentile, which was forbidden. The Jews knew this, and this is why Matthew's Gospel includes this exception. The Catholic Church does follow what Jesus says, when his words are properly translated.