Writing about the Hebrew narrative, Nahum Sarna says the Joseph story is told by a master storyteller who employs novelistic techniques with consummate skill (Genesis, JPS Commentary, p.254). I think I hear a bit of that skill echoing into the work of the Greek translator, as well.
When I read Genesis 39:20–21, the similar sounds of a couple word pairs pull the verses together in my mind, setting off the thematic contrast like symbols.
20 καὶ λαβὼν ὁ κύριος Ιωσηφ ἐνέβαλεν αὐτὸν εἰς τὸ ὀχύρωμα, εἰς τὸν τόπον, ἐν ᾧ οἱ δεσμῶται τοῦ βασιλέως κατέχονται ἐκεῖ ἐν τῷ ὀχυρώματι. 21 Καὶ ἦν κύριος μετὰ Ιωσηφ καὶ κατέχεεν αὐτοῦ ἔλεος καὶ ἔδωκεν αὐτῷ χάριν ἐναντίον τοῦ ἀρχιδεσμοφύλακος …
20 And when the master had seized Joseph, he threw him into prison, into the place where the prisoners of the king are kept locked up. 21 And the Lord was with Joseph, and he poured out his mercy and gave him grace before the head guard …
Joseph landed where the prisoners are kept (κατέχονται), but in that awful place the Lord poured out (κατέχεεν) mercy upon him. The lowercase lord (κύριος) put him in prison, but the Lord’s (κύριος) mercy flows freely there, too.
It’s striking and beautiful.