In the UK we have a warranty period with no particular limit, undergirded by the EU 2 year default, through the Consumer Rights Act -- basically it's founded on how long products would be reasonably expected to last, a fridge should last a decade, a cheap toy arguably far less.
But, I've had a problem with this that I think it's a useful example: Steam sold me a defective game, I tried to play it but the bugs ultimately made it impossible to enjoy (the purpose of entertainment!). Under the CRA digital goods are explicitly included in the ability to return when defective; but Steam/Valve decided their rules on "play" time trumped UK law. PayPal provided a refund (tiny amount of money) in accordance with their terms, but now Steam have taken revenge (the employee time spent on the issue certainly cost more than the original purchase), threatening to close, and then simply limiting my account. That should be illegal IMO, but I don't know if it is. I'm not going to pursue them at this point.
Imagine if a fast-food outlet said "if you complain about your food we'll ban you from buying from us", that would have a perverse effect on consumers and reduce the ability to push back against instances of low quality food. Sure, you can boycott them but that seems worse for everyone.
TL;DR at least in the digital domain, even with strong consumer protections companies can work around the law.