The Akatsuki were strong, but they were far from the most powerful villains of the Naruto franchise.
The fourth great ninja war was catastrophic, and many powerful Shinobi took part in it to save the world.