Agreed. Maybe I have become too much of a PHB, but I find that engineers (or scientists in my case) really love having cost as one of the visible metrics to optimize for, and will generally do a fantastic job at evaluating it amongst quality concerns. At least much better than management can do.
I agree. In most of the places I've worked, devs have always taken costs into account as part of the design and development decisions, to the degree that they can. But at most companies, things like cost, expected ROI, etc. are never revealed to the devs, leaving it to guesswork.
All the good engineers I know will prioritize the product though. "Accountants" will prioritize the cost. The "cheapest good product" and the "best cheap product" are almost never the same. The the latter is what you want to pay for but the former is what you want to have.
I think this is an oversimplification. Engineers prioritize the product, as they should, but what the best solution is depends on the constraints, and that includes things like cost of production, target price point, etc.
"Good, cheap, fast: pick two" is a law of the universe that most engineers deeply understand, and good devs will produce the best product they can according to which two are chosen.