Depends on the setup. The Mozilla store is run by Mozilla, so the cost of a Firefox t-shirt is probably half product cost and half Mozilla profit. Cafe Press, a major company that you can use to print and sell your shirts, takes its wholesale cut and leaves whatever is left to the creator. And even in the case of logo licensing, the developer gets license fees from the clothing producer. No brand gets tossed around for free.
Unbranded products, on the other hand, are designed and sold by a t-shirt company. When you buy a shirt from ThinkGeek (for example), all profits go to ThinkGeek. While some of the shirts they sell are pretty cool and way geeky, there's no developer support behind them. So that's not quite what I was talking about.
An example where some of your clothing dollars help fund development:
http://redhat.brandfuelstores.com/index.php?main_page=index&cPath=1