Note that there are some third-party repair shops who can get their hands on official components, so in this case we’re talking about repair shops who have repaired the iPhone using genuine equipment. This is not a case of taking it into an Apple Store and having it fail on users after it has been repaired.
This has been confirmed by the repair community and also the folks at Engadget who tested it out themselves, where they swapped displays between brand new iPhones only to have the ambient light sensor to stop working after. Apple has been known to make it hard for third-party repair companies to fix their products, usually asking customers to send it in to the official Apple Store.
However considering that out of warranty repairs can be rather costly through official channels, it is not surprising that customers would turn to cheaper alternatives. Apple has yet to respond to this issue but if this is history repeating itself, we wouldn’t be surprised if there were lawsuits filed.