The bike industry has SERIUS diminishing returns as you go up in price.
Almost every component of a bike can be had for pennies at the cheap end, and hundreds if not thousands of bucks at the expensive end.
But really, it depends on what exactly you're doing. If you're competing, maybe shaving some grams off is worth an exorbitant sum.
But for me? I'll buy the cheapest part I can find, that isn't outright trash. I'll pay for ergonomics, or some parts in accent colours...
But at a certain point you start paying for things that effectively make little to no difference. An extra gear you won't really benefit from because it doesn't actually expand gear range.
More expensive bearings that'll gain you a fraction of percent in pedaling efficiency.
Heatsinks on brakepads that were never going to overheat.
When buying a bike, I start by looking at the frame. Everything else can be changed. A frame will last forever when taken care of, but if it has a problem, it's essentially impossible to fix.
After that, I look at the parts list and consider if it's a good deal, how much I'd have to spend on any changes I'd want to make.