If you need to send your phone in for warranty service, having an unlocked bootloader or a custom recovery installed will likely void that warranty. Flashing the Stock ROM and re-locking the bootloader returns the phone to its "out-of-the-box" state, making it eligible for service center repairs.