The same way non-profit Penn State charges 110,000 people fifty bucks each to see a football game (yeah, that's $5.5 million X 7 Saturdays each fall, and that's before you get to the concession stand), or your favorite non-profit hospital runs a cafeteria & parking garage. Non-profit corporations conduct business like any other outfit, they just account for it differently so they can turn in a yearly tax return showing they've spent as much as they brought in, more or less. It's a provision the IRS extends to educational, religious and charitable organizations. Public broadcasting fits in under "educational."
Where it really gets confusing is differentiating between non-profit and non-commercial. Two different things. Which is why the non-profit WITF organization can own a network that sells commercials and a magazine that sells ads...