Duke was only a villain in the beginning
Yeah it was very shady of him to try to make money off Rocky's name when he was clearly not in boxing shape anymore from a mental standpoint if not physical. However, when he lured Tommy into his clutches I think he came to terms with the fact that Rocky was not fighting anymore, and Tommy was his man.
Rocky was being a hypocrite and a hindrance to both Tommy and his family for trying to steer Tommy away from Duke. How quick Rocky is to forget that he did the exact same thing when he signed on with Jergens to get the big payday fight with Apollo. Mick didn't have the contacts to get Rocky the big payday fight the same way Rocky didn't have the contacts to get Tommy the big payday fight. Tommy, like young Rocky before him, wanted to get his foot in the door. Also, it's not like Rocky and Duke's interests in Tommy conflict. Rocky was his trainer, Duke was his promoter. Duke even said "Rocky can keep training you, he's done a magnificent job," it's not like Duke had his own trainer lined up to replace Rocky. He was right, when he showed up at the Balboas' Christmas party it could have been the start of a wonderful relationship among all. Rocky could have taken enough of a cut from Tommy's fights to have his family living somewhat financially stable.
As for Duke's last attempt to get Rocky into the ring with Tommy at the end of the movie, that was a desperation reaction to the press acting like jerks. Tommy said he would fight anyone anywhere anytime and they continued to throw Rocky in his face and bring up the fact that he just beat a paper champion, which was not Tommy's fault nor problem. Seriously, what did they want Tommy to do, carry Kane for 10 or more rounds to make him look legitimate? Okay, Kane was a bum, and Tommy demolished the bum. Next!