I've only had to hire a lawyer once, and it was $2,500 to have them file a couple papers and speak to the judge once.
You're paying for their experience, just like an engineer - only it's often much higher stakes than a piece of software or product: your livelihood or freedom.