If you make enough varied AIs, some will have self-replicating behavior, just like if you make enough random proteins, some will self-replicate.