...the proper and direct cause of sin is to be considered on the part of the adherence to a mutable good; in which respect every sinful act proceeds from inordinate desire for some temporal good. Now the fact that anyone desires a temporal good inordinately, is due to the fact that he loves himself inordinately; for to wish anyone some good is to love him. Therefore it is evident that inordinate love of self is the cause of every sin.
Thomas Aquinas, Summa Theologiae 2-1.77.4