Non-competes are legit if they are narrowly limited in time and scope. It's perfectly fine for a company to demand that if they hand over their proprietary know-how to you, know-how that has cost them years to acquire, you won't take it to the competitor across the street. And no, an NDA is not enough to protect them. They own this information, not you, and no, you can't take it.
NDAs are legit for obvious reasons.
Work-for-hire clauses are absolutely required. If a company is paying you, they own what you create on company time and company equipment. No, you can't take it and sell it elsewhere. It's perfectly fine for you to resist signing a clause that says they own what you create offsite (so long as it's not related to your day job), but a company cannot continue to operate if employees can take what the company paid for.