Why prime? Let's be honest, priming a substrate/surface(before you paint) is a waste of time and money.
But that may depend on your mindset, expectations, the value placed on quality, and the value placed on your efforts. Do you need to prime every time you paint? Probably not. Do you need to prime bare substrates/surfaces, stains, or slick surfaces before painting? I would recommend it.
Because we tend to want home projects to get done quickly, there is a temptation to take short cuts....especially in painting. It would be hard to name each scenario in which to prime or not to prime but we can examine general practices. If in doubt, consult your local Sherwin-Williams, Benjamin Moore , or XIM dealer. There are as many primers as a prism has colors. Each primer is specifically designed for a particular purpose, substrate, and environment.
If you are strictly repainting walls in a room that are not a vibrant or dark color and/or glossy, chances are you shouldn't need to prime but should be able to apply 2 coats of your finish paint after a light wall sanding. I would prime raw wood prior to painting to ensure proper adhesion and a uniform appearance of the finish coat. Fresh drywall or drywall patches should be primed or spot primed prior an application of a topcoat. There are many other examples in which it would be necessary to prime prior to the topcoat application but we can stop here. Primers have been formulated with extra binders and specialty formulated for sealing surfaces.
It is also worth noting that if you are painting a latex over an oil/alkyd paint....you better sand and prime it before your latex topcoat is applied. If you are unsure if the painted surface is an oil product, test it. Put a little denatured alcohol on a rag and gently rub the surface. If the paint softens up, it's a latex product. If the denatured alcohol seems to do nothing to the surface, you have an oil topcoat.
I am generally not a fan(not one bit) of the 2-in-1 primer/paints. It's a clever marketing scheme but you will still probably need to apply 2 coats of paint for a uniform appearance and proper performance.