Selfishness is about intent. Not about doing self-serving things because you lack the intelligence to do more altruistic things. That’s just my perspective.
Even from a completely mechanical, machine-level rationality point of view, a lot of things we humans do is against our best long-term interest, because poorly contained impulses of short-term interest ruin that.