a) they were given out for free at some convention.
b) they were hopefully cheaper than a plain shirt because you're advertising when you wear it.
c) the person really likes the brand and wants other people to know about it.
d) the brand is famous for some sort of quality product, i.e. Nike, Jansport, Apple or Office Depot. Whether that's true or not doesn't matter because of the social attidtude towards the product.