I don't think it has anything to do with the presence of adjective. If you left out the word "terrible," the proper phrasing would still be "a sin and an immorality."
(The indefinite article changes from "a" to "an" for euphony, when preceding a word that begins with a vowel sound).
You could avoid the indefinite article by changing "sin" and "immorality" to their adjectival forms, though: "it is also sinful and immoral."