A bit of both. And a dash of general cheapness, too.
AI, for all the bad, is able to quickly exploit flaws. Mostly already known ones. Admins are not always keeping things up to date, when there's even a admin. Infrastructure is badly done, having gaping open doors that only asks for someone to enter. Competent people all around, able to detect, act, and fix, are removed because who needs this.