The Soyuz uses conical boosters because there's an aerodynamic advantage.
According to The Red Rockets' Glare:
Engineers gravitated to a conical shape primarily because of the
aerodynamic advantages ...but also for 3 other reasons: the large size
of the engines at the tail end, the possibility of imparting
additional thrust to the central sustainer by the shape of the
booster, and the opportunity of decreasing wall thickness.
Another source claims:
But it turned out that the conical-shaped boosters of the Soyuz are an advantage for the aerodynamics, especially the gap between the boosters has an effect of a “negative” wing.
At first glance a cone wouldn't appear to have an advantage: drag depends mostly on frontal area, and a cone has a larger frontal area than a cylinder of the same volume.
But a cylinder of this diameter would be half as long as the conical booster, giving a short, stubby shape that is less efficient than a long, thin cylinder.
And there's a more subtle effect going on here, one specific to having 4 boosters close to each other. Rockets with 2 boosters wouldn't benefit from this effect.
The other conical rocket is the N-1. In this case, there's no aerodynamic advantage. The rocket's shape is due to limitations of manufacturing technology: a spherical tank was easier to manufacture than a cylindrical one, so they used spheres. But they needed two spheres of different diameters to get the fuel:oxidiser ratio correct, so they ended up with conical stages.
According to Foothold in the Heavens: The Seventies, the Soviets were unable to produce cylindrical tanks that were part of the rocket's load-bearing structure: they couldn't manufacture aluminium plate that was thick enough for the job. So they had to separate the rocket's skin from the tank. They chose to use a spherical tank instead of having two cylinders inside one another, to minimize contact between the tank and the outer skin.
From the website linked to the book N-1 for the Moon and Mars: