With Great Power Comes Responsibility and Duty.
Even though there are some situations where they can't always use this method, Lawful Good characters believe the best way is to have a specific, strict code of conduct, whether self-imposed or codified as a law. Their first impulse when making a moral decision is to refer back to this code; those with externally imposed systems (codes of laws, hierarchies, etc.) will try to work within the system when those systems go wrong. Depending on whether they are more Lawful or more Good, they will either refuse to break the code even though it would hurt someone, or else break it only very reluctantly, and only when it would hurt someone if they kept their code. Lawful Good characters have to be very good at Taking A Third Option.