Most written accounts of a person’s life would put the genealogy right at the beginning – like the Gospel of Matthew. Again like Matthew, most often the genealogy will start with the ancestor and work forward to the subject of the account. But Luke puts the genealogy here, subsequent to the birth narrative, and lists the legal ancestors in reverse order. The result is that Luke concludes with Adam, right before giving the account of Jesus’ temptation. I suspect this is an intentional contrast.
Adam was tempted by Satan at the beginning and failed. Because of that failure, all humanity is stained by Adam’s sin.
Now the second Adam, Jesus, is tempted – but He resists Satan. And in Him, all redeemed humanity is restored to God.