Note that show creators do not have to avoid product placement, and are free to mention products that they do not have licensing deals with. There is no law that says they can't, nor any automatic fee that can be levied just for mentioning a brand. At least not in the US, where free speech is enshrined in the constitution.
Consider The Office, where Apple benefited from free publicity for their iPod, because the writer's felt it was the right product for their scene, but did not make any arrangement with Apple at all. They've also used other brand names in order to establish realism, without any deals, as listed in the second paragraph here on Wikipedia.
Or, as of 2015, look at the show Silicon Valley. In the opening title sequence alone, they display the logos of dozens of brands with huge marketing potential, and the sequence changes time to time as well, showing even more brands. No show could afford to pay for all of those brands if it was a requirement.
More often the case is that brands are avoided, though. The reason you see unbranded goods in TV shows is simply to maintain good relations with brands, avoid potential litigation, and lastly to maintain the value of product placement.
Most of the TV industry still makes its money off of advertising, and usually their contracts are with large corporations and advertising agencies that represent hundreds or thousands of brands.
So let's say a show depicts one product in a way that is detrimental to a brand, at least in the eyes of the company that makes it. It might be the case where that brand is not advertised anywhere on the network. But, the people who own that brand have other products being advertised, and they may threaten to reduce or pull the other advertising.
Yet more likely, networks and production companies have a blanket policy of not using brands as much as possible simply to avoid potential problems. After all, if you're a network who makes money of advertisers, you want to present an image of being advertising friendly, which would mean avoiding hassles with brands in general, so as to assure future advertisers of a safe harbour.
There is also the potential for litigation. If a show depicts a brand as being wildly harmful to people or characters, then a company might even go so far as to sue for damages in the form of lost sales. Or, if a brand is shown in a way that can be used dangerously in real like (like Mythbusters making a bomb out of a detergent), the show might even face criminal charges.
This kind of legislation is a rarity, but if it does happen, it could be disastrous, and lawyers are a risk adverse bunch, so their advice to networks and production companies is to just not risk it.
So, in short, the reason you don't usually see brand names in shows is because the networks and production houses are playing it "better safe than sorry".
Oh, and I mentioned maintaining the value of product placement. By removing all real life brands from a show, then when you do show a brand, it has value you can sell to an advertiser. If you're Coke, you might be less inclined to advertise on a show where a character was seen last week drinking a Pepsi, and Pepsi didn't have to pay for it. It's not as valuable to be just one of many brands depicted on the show as it is to be the only brand the sexy character uses exclusively.