E.g: A car has 1 year warranty. But the warranty is extended by one year so long as you service it with manufacturer, not a third party. This doesn't prevent me from servicing with a third party for half the price, but it might not be worth doing that. And I would think twice about buying a car which is only a few years old unless it's serviced completely at first party, due to issues that could arise with warranty claims.
Could legislation be made that says "If you repair at a third party, or even repair yourself, and you know what you are doing/do it according to the recommendation, then the manufacturer has to give the same warranty they would have if you serviced it at them"? Because that feels insane. The warranty is just a kickback for using their expensive service, getting you to the service place/showroom regularly etc.