He wowed them in the audition. And the original character design was that he’d be a lying creep. But because NPH is so charismatic, the character became charismatic. Because people liked him, they never did make him turn out to be some PUA asshole lying about all his exploits.
Instead, it became more like women liked him so much they didn’t mind.
I can’t remember where I got this info–probably interviews I watched with my sister.
In my opinion, he’s not so much portraying him in a bad light as portraying him as completely and totally wrong for Robin, since he’s just a womanizer.
That is, as the conceit at the end. It doesn’t really work as well with Robin and Barney being together for so long and Barney basically changing. That made it seem more like Robin and Barney were perfect for each other, as Robin “fixed” him.