Nissan Warranty Q.

Back when my parents purchased their 05 Nissan Altima, they also opted for the extended warranty(at pretty much no cost because my uncle sold them the car). Now the battery died a couple of days ago and it needed to be replaced. My mom didnt get it replaced at the Nissan dealership and she went over the warrant after the fact to see what it said. Apparently having work done elsewhere(such as changing a battery) and not at a nissan stealership nulls and voids the warranty. First of all, what the fuck is up with that shit? Second of all, isnt that illegal? I mean, thats some sort of monopoly is it not? Shit i even know getting your oil changed somewhere other than a ferrari dealership doesnt void your warranty with ferrari. Any info/help would be greatly appreciated.