It seems that you copy/pasted a different comment into this spot, <
https://news.ycombinator.com/item?id=11153134 >.
I replied to that other comment.
But since you brought up the comparison with a lawyer ... have you ever worked with them? I have worked with lawyers on several occasions and what you describe is not really the sort of thing a lawyer does.
If a lawyer senses that a client is willfully ignoring their advice, and particularly if that client is forcing the lawyer to pursue lines of action that are not beneficial, then the lawyer has many abilities to file to withdraw from representation (depending on the country and the type of field they are practicing in).
I've seen lawyers walk away from clients on a number of occasions, and usually all that is required is for the lawyer to say there is a difficulty agreeing on the necessary steps to best represent the client.
Lawyers have to be aware of this option because if they merely execute the instructions of their client, without lobbying for the client to use the best legal analysis to pick the best course of action, it can be damaging to the lawyer's career. So even if they can keep billing for the hours in which the client just wants to micromanage them, it's often not worth it, because it damages future earnings.
It is very much the same for an engineer. If a boss wants to micromanage (which is essentially the issue you describe -- when a boss ignores or overrides the engineer's critical thinking ability and personal analysis of the best trade-offs and instead demands that some non-optimal action be taken without justification or collaboration), that can be extremely damaging to an engineer's career and future earnings.
Putting up with it in the short term because "that's just how jobs are" and you should "just do it because you get paid for what your boss wants" is a really bad idea, even just in financial terms, because you will be damaging your chances to enhance your skills and your job experience won't cause others to value you highly. And there are other very serious risks too, like the risk of career burnout and prolonged cognitive health issues at work, that are arguably even more serious than financial concerns.
"Give the best advice, then do whatever the client desires" is terrible advice for a lawyer, and equally bad for an engineer (where 'client' is replaced with 'manager').