A barrel of crude does not become one product. It separates by boiling point into a spectrum: light gases, naphtha, gasoline-range material, kerosene and jet, diesel and heating oil, and at the bottom heavy residue. The proportions depend on the crude and on what the refinery can do to it.
Distillation sets the starting point and is largely determined by the crude's own distillation profile. Upgrading changes it: a catalytic cracker converts heavier material into gasoline range, a hydrocracker into distillate, a coker breaks residue into lighter products and solid coke. The presence or absence of those units is what refinery complexity means, and it decides which crudes a plant can buy profitably.
Yields are joint and constrained, which has consequences the market lives with constantly. A refiner facing very strong diesel cracks cannot simply produce diesel; it can shift the slate at the margin by a few percentage points, favour crudes that yield more distillate, and delay maintenance on the hydrocracker, but the bulk of the yield is set by physics and installed equipment. So a genuine distillate shortage tends to persist, and it tends to come with a gasoline surplus.
Product specifications constrain the yield further, and they change over time. Sulphur limits, seasonal gasoline volatility rules and marine fuel regulations all alter what counts as a saleable product, which reprices the yield without changing a single physical process. See product specs.