Later, when I met him, he demanded a % of the profit from me.
No, he has no right to ask you for commission because I'm sure he wasn't going to cover if the bet lost. If he was joking about it and you gave him some randomly, it would make sense but if he sounds demanding, as you mentioned he did, then it's totally wrong of him.
Then he got upset.
His getting upset when you refused to give him money leads me to think he is either going through tough times or he is addicted to gambling and wants some money so that he can go and gamble it.
Has such an incident ever happened to you?
Mine was a funny one. I met someone on telegram who claimed to have sure bets, and I decided to give it a try. He won the first 2-3 bets and I actually paid him, but then he lost and upon asking, he said it can happen every once in a while. Then he went to lose 2-3 more and never replied lmao