If you already have the equipment, or need enough moldings to justify buying whatever equipment you don't have, AND you have access to affordable rough cut lumber then there is no reason not to make your own moldings.
I pay, on average, $2-2.50 a board foot for locally grown 4/4 hardwoods like cherry, red oak, maple, walnut, ash and popular. Big box stores sell 3 1/4 inch pine baseboard for about $1.20 a linear foot, oak $1.50. I could get 3 linear feet of 3 1/4 molding out of a board foot, so yes, material wise you can make it cheaper. Probably for half the cost.
Your rectangular moldings would require a jointer, planer, table saw and router table.
But there are plenty of other reasons to make your own moldings, especially if you invest in a molder. The inexpensive moldings from big box stores are less then 1/2 inch thick, by making them yourself you can control how thick you want them and by varying the thickness of various moldings you can create dramatic effects in your room.
By making them yourself, you have far more choices in woods, not just pine and oak or PVC.
By making them yourself, you have far more choices in profiles when making your own molding, in fact, if you want to exactly recreate existing moldings, or something you've seen elsewhere, you can have custom knives made.
By making the moldings yourself you are in complete control, so why not?
In woodworking there is always more then one way to accomplish something.