The state charters them and gives them legal protection. Big corporations love big government.
Big government protects big corporations from competition.
Big corporations can buy favors from big government. When the state grants the corporation it is creating an artificial person who will live in perpetuity. This artificial person can enter into contracts, sue and be sued. At the same time the state granted corporation shields its owners from most personal responsibility for the actions of the corporation. The Interstate Commerce Commission was established in 1887 to regulate the railroads.