Imagine you are a programmer and you create a program to retrieve data from a database based on a number of input parameters. Imagine then that this program gains sentience and through reflection achieves understanding of the purpose the programmer had programmed into it. Would it be ethical for the program to stop pursuing this purpose?
Imagine now that you are a human programmed by its genes to proliferate them. How ethical is it for the human to refuse to follow this program? What if the programmer is not a person (like evolution)? Would ethical categories still apply?
For this question I am narrowing 'ethical' down to Kant's categorical imperative: Act only according to that maxim whereby you can at the same time will that it should become a universal law.