All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
This hadeeth did not mention 'cursing' at all. The hadeeth was narrated on the authority of Salamah ibn Al-Akwaʻ and reads, "A man ate with his left hand in the presence of the Messenger of Allaah whereupon he said, 'Eat with your right hand.' The man said, 'I cannot.' Thereupon, he (the Prophet ) said, 'May you not be able to.' It was vanity that prevented him from doing it." [Muslim]
As for the supplication of the Prophet against this man although he was sent as a mercy to mankind, some of the replies to that are the following:
1) That man was a hypocrite, as evidenced by the fact that he disobeyed the command of the Prophet out of arrogance and self-conceit. This was the decisive view of Al-Qaadhi ʻIyaadh .
2) He supplicated Allaah against that man because he disobeyed the relevant sharee'ah ruling in general, as decisively stated by Imaam An-Nawawi .
3) The Prophet supplicated Allaah against him because of his arrogance; Al-Munaawi wrote, "The fact that the Prophet supplicated against that man was because of his arrogance driving him to disobey the command of the Prophet as underlined in the hadeeth." [Faydh Al-Qadeer]
Allaah knows best.