People are susceptible to pressures in and around them, including subtle suggestions and innuendos that they not not even acknowledge to themselves, let alone voice to anybody else. Dying is one of life's most important occasions. Time is necessary to give blessings, make reconciliation and say good-byes. Most people have second thoughts about any decision they have made in the past, especially when confronted with the reality of what is just about to happen to them. Assessing mental capability is extremely difficult.
Few people can make a completely rational decision.
Those who have been abused expect to die young and survivors often feel they deserve to die. Because of these factors, ancient medicine included oaths that provided immutable guidelines, so that they were not susceptible to family squabbles, politically correct morality, economic pressures or even the whims of patient choice. Many modern ethicists would chortle at the idea that a physician should always treat, but there is no safe option. If the physician is determined to do his or her best with the resources at hand, treating those who are most likely to benefit when there are limited resources, then the population and the patient will trust him or her. It is up to some other agency to restrain him or her if that is necessary.