Being an attacking player and trying to contribute to defensive chores isn't an easy thing. And that's basically why most super-talented/skillfull players usually don't bother trying to defend and just stick to dribbling and shooting.
And well, Neymar isn't exactly one of the "most". Not that he's really famous for his ability to defend, he does venture to a good tackle every once in a while. But he's no defender, so he get booked. A. Lot. That, combined to all the yellows he collected for awful diving, and you get one of the worst disciplinary records in European top 5 leagues.
One stat to bolster this? Since 2009, Neymar got 131 yellow cards and 6 reds in all competitions, agains 124 yellows and 6 reds for ... Pepe. So the most savage defender in all of European top 5 leagues got less cards that the Barça magician ? Now that's surprising.
In an interview for French magazine Surface in 2016, when asked about his... roughness, Pepe said: "People can say whatever they want, the fact is Neymar is booked more often than I am. Real Madrid is an examplary club. If I was as mad as people think, I wouldn't have had the chance to represent it for this long." That kinda makes sense.