I'm guessing that the copy you pirated was an earlier version that was cracked. The new one that you bought, (off of Steam I imagine?) was probably a much newer version of the game that has been updated and optimized since the release.
It could have also been Rockstar hiding something in the code that could detect whether the version being run was pirated and crippled the performance. Some companies have done little things like that to fight pirating, like limiting the FOV or disabling whole chunks of the game.
Good on you for buying a legit copy.