Everything is always cheaper when you make it yourself, because you're not paying someone else to make it. It costs you time instead. To make actual spaghetti, all you need is durum wheat flour - now look at the price of a bag of flour. Much less than the same weight of spaghetti. Of course it will be more if you want to make egg pasta - then it's flour and egg paste instead of flour and water paste. Buy dried pasta and that's all it is - flour and water paste cut into shape and dried. And it will be very hard to make spaghetti without a pasta machine to roll it out and cut it into shape, but that's a one-off cost.
Look, in Italy, pasta is poor people's food! Or at least, that's how it started. It uses all the things they grow and make locally. So in the south of Italy, it's cheap food (the north is better at growing rice and that's where risottos come from). And that's because they make it themselves from what they grow on their farm or buy in the market.
I really can't comment on your friend's costs because you didn't say how much she makes at a time.
Everything else is not spaghetti, it's the sauce. But it's still the same - make it from raw ingredients and it will be cheaper than having someone make it for you and put it in a jar.
A big pot is worth making. Freeze what you don't eat now (I do this in individual portions in freezer bags because there's just me) and then all I have to do when I don't feel like cooking is open a bag from the freezer and heat it up, meanwhile boil some dried spaghetti to go with it. This is MY ready-made!
Of course if you can't cook or are too lazy to cook, then buy it made. It's your spending, not mine. But making a sauce for pasta is not hard, just learn, make a big pot when you have spare time, and you have like I do - my very own ready-made sauce that is chemical and preservative-free and just needs heating up again.
The main thing that takes time is chopping things up. But if it's a tomato sauce, canned chopped tomatoes are really cheap and that will save a lot of time. I get through a lot of them for all kinds of dishes! Which leaves one skill to learn - chopping onions into dice. This is best done with a really SHARP large cook's knife and there are videos to show you how to do it. Practice makes perfect and I can turn an onion into tiny dice in the time it takes for the oil to heat up in the pan to start off a bolognese sauce.
Batch cooking is a wonderful thing - I do it with stews and casseroles. Stew for one doesn't work but stew for four does, and it's dead easy. Chopping everything into equal-sized cubes will take some time, but then all you have to do is put it all in a big pot, add the liquid, and let it bubble away on a low heat until it's done (beef stew will take 3 hours, other meats less). Then I eat a quarter for dinner, let the rest cool down, divide into 3 freezer bags and that's 3 more dinners in my freezer stash for any time in the next 3 months.