I don't think that is a good idea for McGregor. Manny Pacquiao is a legendary boxer and is very close to defeating Mayweather way back.
In terms of winning chances, it is not a good idea but in terms of money he will get regardless of the outcome, it's a good idea to fight Manny.
That's the simple logic I see why he challenge Manny to fight him.
We can think that it's not the genre of Conor but this is all good for him and he's in a win-win situation. Everyone is already expecting that he will lose on this boxing match. We know Manny is a professional boxer, a legend, a champion while Conor, he's in different genre of fighting which is MMA. But despite of that, he can actually win through numbers and profits of this match so that's why this is a good match for him. I've heard that this match will be for real.