You said, in part: But I would agree that a partnership or sole proprietorship could fire you for any reason it chose. But a corporation, either a privately or publicly held one, is a creature of the State, and is thus subject to whatever limitations the State might choose to apply to it. Of course the State is a pretty stupid beast as well, and may (will!) exercise it's powers unwisely. But it does have those powers over corporations.
***
A state could impose restrictions on job discrmination even on sole proprietorships and partnerships, if it were so inclined. While I agree that coporations are state created, but they are owned and run by individuals, and as such, should not be treated differently than other employers.
But they already are. Mostly preferentially.