Your question seems to presume the sphere and cylinder have the same diameter. I am not sure it is necessarily true that a cylinder has less drag than a sphere of the same diameter. I would think a cylinder has more drag than a sphere of the same diameter but there are performance metrics other than drag to consider when talking about bullets, missiles, and rockets.
What should be intuitive is that a cylinder of the same diameter will be able to have much more volume/mass for a relatively minor increase in drag. That is because you pay for the frontal drag due to cross section only once and skin drag of the parallel sides of the cylinder is fairly minor. So you can keep adding more volume/mass by extending the length of the cylinder for a relatively minor increase in drag compared to if you were to increase the volume/mass of a sphere. That lets you make bigger rockets and heavier bullets without significant drag penalties.
Similarly, the same volume, a cylinder will a frontal cross section that is smaller than that of the sphere. I am not sure where the exact drag balance lays between the smaller, but flat frontal cross section of the cylinder versus the rounded, but larger diameter of the sphere, but it does reduce drag disadvantage of the cylinder's flat face, while providing advantages of the cylinder (such as the ability to add fins or rifling for stabilization and more usable payload volume).
EDIT:
So according to Wiki,
https://en.wikipedia.org/wiki/Drag_coefficient#/media/File:14ilf1l.svg
which is drawing its data from Clancy, L. J. (1975). "5.18". Aerodynamics. Wiley. ISBN 978-0-470-15837-1.
The drag coefficients as a result of frontal area are as follows:
So that would mean that for the same diameter, the drag on a cylinder is significantly more than that of a sphere. This is even when mostly neglecting the skin drag of the sides of the cylinder.
However, since the volumes are:
$V_{sphere}=\frac{4}{3}\pi r^3$
$V_{cylinder}=\pi r^2 L$
When used with the coefficients of drag provided, that means that once a cylinder has a radius/diameter that is smaller than 75.7% the radius of a sphere, the cylinder will begin to have less drag, assuming the conditions of what constitutes a "long cylinder" in the table are met. And of course, you can just keep increasing the length of the cylinder for relatively insignificant increases in drag.
Doubling the volume of the sphere requires a 26% increase in radius/diameter which increases the TOTAL drag by 58.7%. But doubling the volume of the cylinder by doubling its length doubles ONLY the skin drag of the sides. I don't have the actual equations or numbers for this type of drag, but it is less than the frontal drag of the cylinder.