If you leave postage out for the postman, how does the postage get paid?
The same way it gets paid if you put outgoing mail in a public mailbox. I buy a book of stamps - about 16 stamps - a couple times each year. You put the stamp on the envelope before you put it in the mail box.
The US post office does have a "Stamps by Mail" program. You get an order form from the post office, fill it out, and mail it back with a check. They send your stamps in the mail.
For outgoing mail larger than a standard letter where a regular first class stamp won't work, you take it to the post office. They weigh and measure it and sell you the right postage.