A legal representative is needed when a patient is deemed incompetent or incapable of making informed decisions about their own healthcare. This can occur due to various reasons such as being in a coma, suffering from severe cognitive impairments, or being under anesthesia.