At one point in time, One-Way non-negotiable contracts where unenforceable and considered coercive. I wonder when / why that changed when we added "on the internet" an called it is "Terms of Service"
Why is easy - because corporations love them. As for the “how”, that’s also pretty simple. Enough money applied to lawyers who argue for the corporation’s side in contract disputes, enough to set precedent.