There are no battleships left in active service. But they were once the kings of the seas, essentially sea dragons that could literally breathe fire. But these behemoths didn't take shots in combat willy-nilly. They typically fired in salvos or partial salvos, with all or most of their guns firing at once. How come?
Well, there are actually a lot of good reasons why battleships and other large artillery platforms typically fire all of their guns or a lot of them at once. This practice, known as a salvo, has different uses.
The most common and obvious reasons to fire all the guns at once is to knock out the enemy's ability to make war as quickly as possible. Battleships are mobile platforms. That means that they are out of range of the enemy until, suddenly, they're not. And if the ships are still closing or if the enemy has better range, then the battleship is in as much danger as the enemy.
But if the battleship fires all of its guns at once and manages to land a couple hits home, then the enemy ship will be forced to fight while crippled. Crucial manpower will be diverted to damage control, some guns could be knocked completely out of service, and there's a chance that the engine or the bridge or another essential area could be destroyed.
If the battleship isn't sure of exactly how far away the enemy ship is, it might fire partial salvos instead. This is when the ship fires a third or half of its guns at once to find the enemy range. While this can technically be done with single shots, it's easy for the fire control officers to miss a round or two hitting the water in the chaos of combat. But if five or ten shells hit the water at once, the officer can definitely tell if the rounds landed far or short.
And salvos typically create a tighter spread of impacts than individually fired guns, so partial salvos to find range can be more accurate than firing individual guns.
But best of all against enemy ships, a salvo could be fired with guns aimed at different points, dropping shells both at the spot where the commanding officer thought the enemy ship would be as well as the point where it would most likely be if it attempted to maneuver away from the impacts. So, even if the rival ship attempts to escape, it's still catching multiple shells in its decks.
But even against shore targets, firing in salvos can be good. That's because taking out a bunker takes a near or direct hit, but bunkers have much less exposed area than an enemy ship does. Firing more guns gives a better chance of busting the bunker in one pass.