This is a complex scam involving multiple participants. I have encountered this in multiple areas of Paris.
The street gambler takes bets on who can tell where the ball is between the three cups. The initial demonstration shows that some random person easily wins the bet and doubles his/her money.
However, it is a mere trap to lure you in, once someone from the crowd actually bets. The gambler uses his actual skill and it becomes almost impossible to tell under which cup the ball is.
This way, the person who placed a bet thinking it is extremely easy, loses out on his money.