I don't think it was entirely random; they had just talked about maybe bringing his sister (if it is indeed her) to the Abyss, which led him to think back on how he himself ended up and began living there, eventually founding a (secret) nation/city (can't remember what they called it in past chapters).
What would have been random is if this flashback/backstory came while fighting the Soul Dragon for instance