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. I accidentally dropped a few lines from the original post. 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.