Laws are certainly not made to be broken in the United States. However, many exceptions can be made when it comes to punishing people who do end up breaking the law. In certain situations, you may be excused from punishment even after you do something against the law. It all depends on what your reasons were for breaking the law in the first place and whether or not you can prove your reasoning to be true. Keep in mind that it's up to police officers and the court system to decide if you were justified and whether your reasoning is sound.
Self-defense as the victim. When you are attacked by someone who is threatening your safety, you are legally allowed to react in self-defense. That is, you can defend yourself with the same amount of aggression that your attacker is using. However, you must be careful when breaking this law. If the attacker is not using deadly force, but you respond with deadly force, you might end up being the one charged with a more serious crime. Even though assault is illegal, you can break this law while protecting yourself or someone else who cannot protect themselves.
Self-defense as the attacker. This is where the self-defense law gets tricky. If you are actually the attacker or the aggressor in a situation, you are already breaking a law. However, if you are not using deadly force and the victim retaliates using deadline force, such as by stabbing you with a pocket knife, you can then respond in kind. This means you broke the law by being the attacker but are legally breaking the law once you start to defend yourself from excessive force on the part of the victim. This is likely to be a messy situation for police officers and the courts to through no matter what the outcome.
Traffic laws, particularly speeding. Speeding, or driving faster than the posted speed limit on a road, is breaking the law. However, if passing another vehicle is necessary for your safety, you are permitted to break this law. For example, if your vehicle is next to someone who is recklessly driving, you may feel the need to pass the vehicle to protect yourself and the passengers in your car. To pass the vehicle, speeding may be necessary. As long as you can prove you had good reason to pass the vehicle, you can legally break this traffic law.