Privacy is a right, it can’t be signed away via their “agreement.”
Remember that our right to privacy is so sacred and expansive that it allows abortion.
Let’s say that I sign an agreement for a developer to take my arm and leg for the use of their app. I wouldn’t say that the agreement is illegal, but it would be illegal for them to take my arm and leg.
An agreement to do something illegal is itself illegal.
You can sign all rights away. Most rental agreements give up a ton of privacy. As for your arm and leg example ever heard of donating organs? I know a person that’s one kidney shy, donated it to a relative. So no it is NOT illegal for them to take your body parts when you sign them away.