Microsoft actually was going to allow that starting with the Xbox One.
IIRC, the way they were going to implement it would be to make a license transferrable X times a year. They were also going to allow free sharing of digital games to friends that had been on your friends list for at least 30 days.
But then people freaked out over it when they showed it off at the Xbox One reveal due to the fact that digitally-purchased games would have always-online requirements to keep people from duplicating games by installing them, disconnecting from the internet, then logging in elsewhere and sharing the game with a friend.
So after the backlash they pulled the plan. And that really stinks because they still have always-online requirements for digital games. You just can’t sell or share them now.
Believe it or not, “It’s only illegal if you get caught” isn’t how copyright works.