GMs think differently from us. KOC probably saw Okur as an asset with value that the Jazz could hold. Think of the GM as managing the player equity of the team. Even if Memo was not in the team's longer term plans, he still had value as a rotation player and trade chip. KOC then did unload him for a TPE that can be exchanged for a player of equal value.
...I think this is giving KOC a little too much credit. Yes, he did still have some value as a rotation player (albeit at a serious risk of injury). But at $21m for 2 years? And I doubt GMs frequently re-sign players with the intention of trading them for a TPE.
I thought that extension was a trainwreck when it was signed.