Do the ends justify the means? Is ethics about following the rules regardless of the consequences, or about helping ourselves and others even when we must break the rules?
Immanuel Kant argued that morals and laws should be followed universally, in all situations, times and places. Kant says we should determine what the objective good is, and then never deviate from it regardless of the consequences. Like the British sea captain who goes down with the ship, Kant believes we should always do our duty.
John Stuart Mill opposed Kant, and argued that morals and laws are merely tools we use to make ourselves and others happy. Mill says that if we take the long term view and the social view, trying to produce as much happiness and prevent as much suffering as possible, we can change and break the rules however we like. Like Robin Hood, Mill believes we should be ethical rather than merely moral, seeking genuine lasting happiness rather than merely following the law.
Both Kant and Mill agree that our desire to be ethical is unquestionably good in itself and that ethics must be securely grounded, but for Kant this means obedience to duty, while for Mill it means striving for happiness. For Kant, if you start with good morals, you are being ethical regardless of the consequences. For Mill, if you aim for good ends, you are being ethical regardless of following the rules.
While Kant appreciates happiness, and Mill appreciates morals, Kant puts morals above happiness and Mill puts happiness above morals. Kant says: Always follow principle, and you will hopefully be happy. Mill says: Always follow happiness, for others as well as yourself, and you will hopefully be principled.
Both positions have strengths and weaknesses. Kant would not waver in the face of temptation, but Mill would change when the rules are wrong. Kant gives us a fixed understanding, while Mill gives us adaptable reasoning. Kant is better if we want to divide the good from the bad, but Mill is better if we want to see the good in the bad and the bad in the good.
Do the ends justify the means? Sometimes yes, and sometimes no. We can and should balance both positions to better understand the judgements and choices we make, defending as well as adapting to maintain and improve our lives.