Corporations exist because the law gives them the right to exist. Years ago to encourage people to invest in new economic ventures governments created laws allowing people to band together, throw their money in a pot, and be protected from liability for anything stupid they did in that enterprise. Their liability was limited to the amount of money they threw in the pot. Originally there were often requirements on how Corporations conducted their business, in particular requirements that the have a limited and specific corporate purpose.
Corporations have turned out to be wonderful vehicles for generating wealth, and protecting wealth, so wealthy and powerful people have over the years managed to remove most of the restrictions on Corporations by using the economic benefits they confer by their presence as a bargaining chip to reward whatever State or Country gives them the best deal.
As a result Corporations have become a dominant force in politics, able to use their financial muscle and marketing expertise to shape public policy to their will. Wall Street undermines regulation by Government, then gets bailed out when their bad decisions blow up in their face. Corporations suck up billions of dollars in Government subsidies each year, even in the face of evidence the subsidy is counterproductive.
Corporations are not people, they are fictitious entities created for convenience by Government - Congress could abolish them tomorrow. It is nonsense for the Supreme Court to say that even though Congress could abolish them, Congress can't regulate them.