First of all, lets get this out of the way - BJ Penn is not "done". He's not some decrepit, ancient former champ that has been KO'd a bunch of times and is now punch drunk. In fact, he still has not been dropped one single time in his career. Yes, he did not do well in his past couple of outings, but he was fighting out of his true weight class against beasts at the top of the division. And I am unconvinced that BJ is "retired". That lava still flows in his veins and is ready to erupt - he just needs to find a proper opponent in his weight class to bring out the "motivated" BJ.
And Gil is that man. In a lot of ways, BJ and Gil are mirror images of each other. Both started out as grapplers, but now, they take the center of the octagon and pressure opponents while swinging heat. There will be no dancing or holding in this fight and it will be interesting to see who will push back who.
And its a win-win from a UFC marketing perspective. If Gil wins, he gets a win over a legend, thus building up his name and laying the foundation for a rematch for the belt. And if BJ wins, he just beat the #2 155er in the world and it immediately puts the biggest PPV draw the UFC has under 170 back "in the mix".
Plus the UFC offered this fight to BJ before, so there is a history there.