As someone who has hired contractors and full time employees many times, this is just insane. I don't care if you are Linus Torvalds himself, as an employer I would never sign a contract that is that lopsided, and to be honest I can't believe that any competent company would either. And given the description you have given of the company that was dumb enough to sign this, they definitely don't sound very competent.
So, I mean I guess congratulations that you got 2 companies to sign this, but I can't think of any decently run company that would ever sign something like that.
Though the length of it is pretty head scratching. The whole point of using consultants was that you needed a short term amount of specific work done, unless you are talking about engaging large consulting companies to deliver a project.
It was a defunct mobile company. I had the contracting company put it in the paperwork, to my surprise they signed. cause they have multiple times let go of contractors to make C level "bonus". It was known for it. I got some push back, but they signed it, they needed an engineer who understood mobile routing records.
3 months into the contract, they apparently forgot, and let me and everyone go. Reason 'services no longer needed' aka CEO wanted to make bonus. I said ok, then called the contractor's legal dept. After 3 days, i got a call back. Told him look at page 4 line 30.. he read it. Long silence. 5 minutes of silence. "I never seen a clause like this. I will call you back with an answer." Next day, Both lawyers call, one asked would i be interested in returning. I said "fufill the contract terms". "Your check will be delivered in two weeks." Contracting firm, was getting paid too. they were happy and mad. Happy for $$$, mad that they probably lost a semi big client.
I got my check, had a new contract before the 2 weeks.
Fast forword to Amazon. They read it and said no. I declined. They offered little more, but I said I will not work for Amazon until they fix their corporate envirnoment. My friend worked there, she lasted 4 months more, after moving to Seattle, and finding out the hard way that amazon is pure corporate monster.