Ten people wasting 6 minutes doesn't necessarily waste an hour. No one is curing cancer with the time "saved" from loading GTA Online. More likely than not, they're playing GTA Online 6 minutes less.
And to be fair to Rockstar, which the author was, this problem lurking in the standard library isn't really to be expected. You expect your standard libraries to be decently optimized.
And why it was undiscovered for years has a very simple answer: It wasn't a priority.
Why should that problem be prioritized over everything else? Everything else that could "burn lifetimes away"? Everything that could make the game crash? Or cause people to stop playing? It's quite possible that this issue was always slightly less important than whatever else may have come up.