Why is the legal system involved in the shareholder/corporation relationship?

Uh… I meant to place this in General Questions but on second thought a debate on this would be interesting.