"Corporations are legal persons" is begging the question. "Legal person" means 'designated entity with special rules', it doesn't carry any intuition or logical consequences beyond whatever the chosen rules are.
That's not true. In law, "person" is an abstraction in the same way a file descriptor is an abstraction in UNIX. The whole point is to carry along with it a built-in set of intuitions.
Now, say I want to figure out a way to insulate myself from that sort of liability. So I enter into an agreement with a driver. I'll buy him a delivery truck, and he'll deliver the packages. In return, he'll give me 75% of what's left over after his expenses. Now I'm insulated from legal liability. I'm just an investor. If he runs over someone, that person can't sue me in my personal capacity. All I have at risk is the truck I bought him. But wait. What's the tax treatment of this arrangement? The driver will be taxed on his net income (revenues - expenses). Then he'll give me 75% of what he has left over. Then I'll be taxed on that amount.
Separate taxation of corporation arises naturally from treating corporations as distinct legal persons.