Why is buying a put option a cash outflow, but shorting inflow?
When you buy a put option, you're taking possiession of something from someone else, and paying for it.

When you short, you're borrowing shares, and selling them, which brings cash in for you.