I am not an expert in scriptures but this is my understanding of these verses. The people of this world are very shrewd, perhaps shrewder than us. The steward knows that he needs to befriend people probably to make a living out of them later. So, he resorted to cheating his master. I think Jesus commended the unjust steward for him being wise, in making friends with people and getting out of the situation using worldly strategies.
But as to whether Jesus thought his behaviour in cheating his master is correct, this is clarified in verse 10.
He that is faithful in that which is least is faithful also in much: and he that is unjust in the least is unjust also in much.
Secondly, although he was unjust, he might have been helping the debtors who could find it hard to repay his lord. He used money to gain friends. And according to the JFB commentary, they might become witnesses of this deed of his in eternity.
Jesus did not commend his unjust behaviour in cheating his lord as we can clearly see in verse 10-13 but was commending him on his shrewdness or his "wiseness" (verse 8).
Jesus says that we have to be faithful in that which is another man's and that we have to serve God and not man. Will we cheat God?
We can see that Jesus continued this parable with teachings on faithfulness in marriage. Here, Jesus is clearly telling us that we are to be faithful.
Isn't it interesting as well that if a man cheats on his wife, he is also not faithful in that which is another man's. Because he took a wife away from her family and both of them became one and now, he is not faithful to someone else's daughter.
God in no way commends unfaithfulness or unjust behaviour. He has clarified this in the rest of the passage.
This is my understanding. I welcome other views.