Why did Oda spend so many years priming everyone into assuming Rocks was going to be some super evil edgelord character only to make him the most based and morally centered pirate in the series?

He's actually a good dad.
He does steal, but prioritizes morally crooked targets like other pirates and those fake philanthropists.
He takes in the all the most dangerous pirates under him and keeps them relatively under control. (see how much worse Big Mom and Kaidou get after he dies)
He knows just how evil the WG is, and he actually does something about it unlike Whitebeard and Roger who only fight when it affects them.