Two things:
Fighting Mayweather gave him more money than he can count... Money shows a person's true nature. Granted, he had money from his fights in the UFC, but it was a drop in the ocean compared to what he probably made in that "boxing" event.
Also, the losses. Prior to Mayweather, he only lost twice. Once on his way to the top back before he was a name. The other was against journeyman Nate Diaz, which McGregor squared back to 1-1.
However, after that he got assaulted in front of millions of people against Khabib, which he can't run back because Khabib retired soon after.
Then he lost to Poirier, ran it back and broke his ankle in the rematch (where he was getting brutalized anyway), and can't run it back again because he needs to heal.
He can't accept that the MMA fighters have figured him out and moved ahead (because it's what they train at non stop) and now he's becoming a nothing fighter in a sport he thought he would be the king in.