No, in those cases you call the company and they send you a coupon to get whatever that thing is for free at the store so that you can participate without spending money. Tim Hortons can give away the cup because it has no product in it, so they're not loosing more than the few cents it costs to make the cup.
There doesn't even have to be a contest to get those coupons, in many cases if you complain about a product they'll send you coupons to make you like them again. Corporations are very desperate. I know a guy who complained about his pizza pops and got a coupon for a free 28-count box of them as an apology from Pillsbury. The downside was, he just ended up with more Pillsbury pizza pops.