There are two color-driven reasons to use primer.
First is to make the surface consistent, so differences in color don't print through. So black screw-heads and white tape against blue insulating board don't show.
Second is to get the substrate closer to the final paint color, so you need fewer coats to actually get the color you were after.
I've had yellow jobs where it took 6 coats to cover gray primer with yellow. It was superb marine paint. But durable yellows don't have good covering power (opacity) since leads and chromates were banned. White primer covered better, but best was a custom mix of white and gray primer. Ultimately it was impractical to keep adding layers of yellow until it was completely opaque, so some print-through of primer color was inevitable, the key was to make it non-objectionable.
Look around at cars in the parking lot. Very few customers custom-order cars anymore, so those paint colors are chosen by the manufacturer, based on the cost of durable pigments. (using a non-durable pigment on a car with a 7 year warranty is out of the question). They do a few blues and reds at a loss, just to mix things up, but how often do you see yellow-based colors like green or orange?