Some dealers offer third-party accessories as options on new cars. I had a car whose aftermarket sunroof was installed by the dealer when it was bought by the original owner. Fortunately, mine never leaked, but I'm not sure the US Lemon Laws would have covered it if it had.