The anorectal junction is pulled forward (perineal flexure) by the action of the puborectalis part of the levator ani muscle, so the anal canal moves in a posterior direction as it passes inferiorly through the pelvic floor.