In the case of the smart tv it's actually because you didn't really pay the full price of the tv. The manufacturer counts on the revenue from those ads to boost the tv profit margin to an acceptable level, otherwise they would have to charge you more for the tv initially.
If you don't believe me, look up the price of a "commercial display" comparable to your tv. And before anyone asks, the majority of customers would rather have a cheaper tv with ads in the menus than a more expensive one without.