Why the small Straw Hat went unnoticed by the World Government for so long
The reason behind the small Straw Hat’s creation was merely symbolic. Just like the large one, it didn’t possess any hidden power and was nothing special at all. It was merely a symbol of the will of D, the will of the Ancient Kingdom, and the 20 Kingdoms who later became the World Government never paid any attention to it because they had no reason to.
Hats made of straw aren’t a rarity in the world of One Piece, at least I’d like to believe that, and the owners of the Straw Hat through the different generations had never managed to accomplish anything major, always failing and passing it down to future generations. I believe Roger was the first D to go far enough to be noticed, and even then, he had already passed his hat down to Shanks before being a big enough threat, and Shanks himself passed his hat down to Luffy before becoming an Emperor.
This is why neither Roger nor Shanks are known as Straw Hat Roger or Straw Hat Shanks; even though some people remember them wearing it, they weren’t a big enough deal when they did.
As for why the Leader created it in the first place, he might have intended for it to be some sort of message to the 20 Kingdoms. After he and his ancient kingdom had died, he might have wanted the 20 Kingdoms to witness their downfall at the hands of a man in a Straw Hat, a way of telling them that they had failed and let a D escape, but that obviously never happened and the Straw Hat itself became more of a symbol of D. rather than a device aimed at irony and revenge.